n = int(input())
list = input()
count_r = list.count('R')
ans = list[:count_r].count('W')

print(ans) n = int(input()) n int(input()) int input() input list = input() list input() input count_r = list.count('R') count_r list.count('R') list.count list count 'R' ans = list[:count_r].count('W') ans list[:count_r].count('W') [:count_r].count [:count_r] list :count_r count_r count 'W' print(ans) print ans n = int(input()) int(input()) n count_r = list.count('R') list.count('R') count_r list = input() input() list ans = list[:count_r].count('W') list[:count_r].count('W') ans
n = int(input())
list = input()
count_r = list.count('R')
ans = list[:count_r].count('W')

print(ans)
