n = int(input())
x = list(input())

sx = len(set(x))
if sx == 1:
    print(0)
    exit()

cnt_r = x.count("R")
cnt = 0
for i in range(cnt_r):
    if x[i] == "W":
        cnt += 1
print(cnt) n = int(input()) n int(input()) int input() input x = list(input()) x list(input()) list input() input sx = len(set(x)) sx len(set(x)) len set(x) set x if sx == 1:
    print(0)
    exit() sx == 1 sx 1 print(0) print 0 exit() exit cnt_r = x.count("R") cnt_r x.count("R") x.count x count "R" cnt = 0 cnt 0 for i in range(cnt_r):
    if x[i] == "W":
        cnt += 1 i range(cnt_r) range cnt_r if x[i] == "W":
        cnt += 1 x[i] == "W" x[i] x i "W" cnt += 1 cnt 1 print(cnt) print cnt sx = len(set(x)) len(set(x)) sx cnt_r = x.count("R") x.count("R") cnt_r cnt += 1 1 cnt n = int(input()) int(input()) n cnt = 0 0 cnt x = list(input()) list(input()) x
n = int(input())
x = list(input())

sx = len(set(x))
if sx == 1:
    print(0)
    exit()

cnt_r = x.count("R")
cnt = 0
for i in range(cnt_r):
    if x[i] == "W":
        cnt += 1
print(cnt)