from sys import stdin
N = int(stdin.readline().rstrip())
C = stdin.readline().rstrip()
rc = C.count('R')
ans = 0
for i in range(rc):
    if C[i] == 'W':
        ans += 1
print(ans) from sys import stdin N = int(stdin.readline().rstrip()) N int(stdin.readline().rstrip()) int stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip C = stdin.readline().rstrip() C stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip rc = C.count('R') rc C.count('R') C.count C count 'R' ans = 0 ans 0 for i in range(rc):
    if C[i] == 'W':
        ans += 1 i range(rc) range rc if C[i] == 'W':
        ans += 1 C[i] == 'W' C[i] C i 'W' ans += 1 ans 1 print(ans) print ans N = int(stdin.readline().rstrip()) int(stdin.readline().rstrip()) N ans += 1 1 ans C = stdin.readline().rstrip() stdin.readline().rstrip() C ans = 0 0 ans rc = C.count('R') C.count('R') rc
from sys import stdin
N = int(stdin.readline().rstrip())
C = stdin.readline().rstrip()
rc = C.count('R')
ans = 0
for i in range(rc):
    if C[i] == 'W':
        ans += 1
print(ans)