N = int(input())
c = list(input())
w = c.count("W")
r = c.count("R")
wr = c[len(c) - w:].count("W")

print(min(r, w - wr)) N = int(input()) N int(input()) int input() input c = list(input()) c list(input()) list input() input w = c.count("W") w c.count("W") c.count c count "W" r = c.count("R") r c.count("R") c.count c count "R" wr = c[len(c) - w:].count("W") wr c[len(c) - w:].count("W") [len(c) - w:].count [len(c) - w:] c len(c) - w: len(c) - w len(c) len c w count "W" print(min(r, w - wr)) print min(r, w - wr) min r w - wr w wr N = int(input()) int(input()) N w = c.count("W") c.count("W") w wr = c[len(c) - w:].count("W") c[len(c) - w:].count("W") wr c = list(input()) list(input()) c r = c.count("R") c.count("R") r
N = int(input())
c = list(input())
w = c.count("W")
r = c.count("R")
wr = c[len(c) - w:].count("W")

print(min(r, w - wr))
