N = int(input())
x = input().strip()
cnt = 0
for i in range(N):
    if x[i]=="R":
        cnt += 1
if cnt==0 or cnt==N:
    print(0)
else:
    ans = 0
    for i in range(cnt):
        if x[i]=="W":
            ans += 1
    print(ans) N = int(input()) N int(input()) int input() input x = input().strip() x input().strip() ().strip () input strip cnt = 0 cnt 0 for i in range(N):
    if x[i]=="R":
        cnt += 1 i range(N) range N if x[i]=="R":
        cnt += 1 x[i]=="R" x[i] x i "R" cnt += 1 cnt 1 if cnt==0 or cnt==N:
    print(0)
else:
    ans = 0
    for i in range(cnt):
        if x[i]=="W":
            ans += 1
    print(ans) cnt==0 or cnt==N cnt==0 cnt 0 cnt==N cnt N print(0) print 0 ans = 0 ans 0 for i in range(cnt):
        if x[i]=="W":
            ans += 1
     i range(cnt) range cnt if x[i]=="W":
            ans += 1
     x[i]=="W" x[i] x i "W" ans += 1 ans 1 print(ans) print ans ans += 1 1 ans cnt += 1 1 cnt ans = 0 0 ans x = input().strip() input().strip() x cnt = 0 0 cnt N = int(input()) int(input()) N
N = int(input())
x = input().strip()
cnt = 0
for i in range(N):
    if x[i]=="R":
        cnt += 1
if cnt==0 or cnt==N:
    print(0)
else:
    ans = 0
    for i in range(cnt):
        if x[i]=="W":
            ans += 1
    print(ans)