# coding: utf-8
# Your code here!
N=int(input())
S=list(input())

R=S.count("R")

W=S[:R].count("W")

print(W) N=int(input()) N int(input()) int input() input S=list(input()) S list(input()) list input() input R=S.count("R") R S.count("R") S.count S count "R" W=S[:R].count("W") W S[:R].count("W") [:R].count [:R] S :R R count "W" print(W) print W S=list(input()) list(input()) S N=int(input()) int(input()) N W=S[:R].count("W") S[:R].count("W") W R=S.count("R") S.count("R") R
# coding: utf-8
# Your code here!
N=int(input())
S=list(input())

R=S.count("R")

W=S[:R].count("W")

print(W)