
# 初期入力
from bisect import bisect_left
import sys
#input = sys.stdin.readline  #文字列では使わない
N = int(input())
c =input().strip()
ans =0
r =[i for i, x in enumerate(c) if x == 'R'] #全体の中でRのIndex
r_num =len(r) #全体でRの数

ans =bisect_left(r,r_num) #呪われないためのRとWの境界
print(r_num -ans) #境界より右側のRの数 from bisect import bisect_left import sys sys N = int(input()) N int(input()) int input() input c =input().strip() c input().strip() ().strip () input strip ans =0 ans 0 i for i, x in enumerate(c) if x == 'R' for i, x in enumerate(c) if x == 'R' i x enumerate(c) enumerate c x == 'R' x 'R' if x == 'R' i r =[i for i, x in enumerate(c) if x == 'R'] r [i for i, x in enumerate(c) if x == 'R'] r_num =len(r) r_num len(r) len r ans =bisect_left(r,r_num) ans bisect_left(r,r_num) bisect_left r r_num print(r_num -ans) print r_num -ans r_num ans r_num =len(r) len(r) r_num ans =bisect_left(r,r_num) bisect_left(r,r_num) ans ans =0 0 ans N = int(input()) int(input()) N c =input().strip() input().strip() c r =[i for i, x in enumerate(c) if x == 'R'] [i for i, x in enumerate(c) if x == 'R'] r

# 初期入力
from bisect import bisect_left
import sys
#input = sys.stdin.readline  #文字列では使わない
N = int(input())
c =input().strip()
ans =0
r =[i for i, x in enumerate(c) if x == 'R'] #全体の中でRのIndex
r_num =len(r) #全体でRの数

ans =bisect_left(r,r_num) #呪われないためのRとWの境界
print(r_num -ans) #境界より右側のRの数