n = int(input())
k = input()

a = k.count("R")
b = k[:a].count("W")
print(b) n = int(input()) n int(input()) int input() input k = input() k input() input a = k.count("R") a k.count("R") k.count k count "R" b = k[:a].count("W") b k[:a].count("W") [:a].count [:a] k :a a count "W" print(b) print b b = k[:a].count("W") k[:a].count("W") b a = k.count("R") k.count("R") a n = int(input()) int(input()) n k = input() input() k
n = int(input())
k = input()

a = k.count("R")
b = k[:a].count("W")
print(b)