from collections import Counter


N = int(input())
c = input()
cntr = Counter(c)

ans = 0
for c, r in zip(c, "R" * cntr["R"]):
    if c != r:
        ans += 1
print(ans) from collections import Counter N = int(input()) N int(input()) int input() input c = input() c input() input cntr = Counter(c) cntr Counter(c) Counter c ans = 0 ans 0 for c, r in zip(c, "R" * cntr["R"]):
    if c != r:
        ans += 1 c r zip(c, "R" * cntr["R"]) zip c "R" * cntr["R"] "R" cntr["R"] cntr "R" if c != r:
        ans += 1 c != r c r ans += 1 ans 1 print(ans) print ans cntr = Counter(c) Counter(c) cntr ans += 1 1 ans N = int(input()) int(input()) N ans = 0 0 ans c = input() input() c
from collections import Counter


N = int(input())
c = input()
cntr = Counter(c)

ans = 0
for c, r in zip(c, "R" * cntr["R"]):
    if c != r:
        ans += 1
print(ans)
