import math
N = int(input())
C = str(input())

C = C.replace('W', '1').replace('R', '0')
C = list(C)
sort_C = sorted(C)

cnt = 0

for i in range(N):
    if C[i] != sort_C[i]:
        cnt += 1

print(math.ceil(cnt/2)) import math math N = int(input()) N int(input()) int input() input C = str(input()) C str(input()) str input() input C = C.replace('W', '1').replace('R', '0') C C.replace('W', '1').replace('R', '0') C.replace('W', '1').replace C.replace('W', '1') C.replace C replace 'W' '1' replace 'R' '0' C = list(C) C list(C) list C sort_C = sorted(C) sort_C sorted(C) sorted C cnt = 0 cnt 0 for i in range(N):
    if C[i] != sort_C[i]:
        cnt += 1 i range(N) range N if C[i] != sort_C[i]:
        cnt += 1 C[i] != sort_C[i] C[i] C i sort_C[i] sort_C i cnt += 1 cnt 1 print(math.ceil(cnt/2)) print math.ceil(cnt/2) math.ceil math ceil cnt/2 cnt 2 C = C.replace('W', '1').replace('R', '0') C.replace('W', '1').replace('R', '0') C sort_C = sorted(C) sorted(C) sort_C cnt += 1 1 cnt C = str(input()) str(input()) C N = int(input()) int(input()) N C = list(C) list(C) C cnt = 0 0 cnt
import math
N = int(input())
C = str(input())

C = C.replace('W', '1').replace('R', '0')
C = list(C)
sort_C = sorted(C)

cnt = 0

for i in range(N):
    if C[i] != sort_C[i]:
        cnt += 1

print(math.ceil(cnt/2))