n=int(input())
c=list(input())

from collections import Counter
cnt=Counter(c)
num_of_red = cnt['R']
num_of_white_replace_to_red = c[:num_of_red].count('W')
print(num_of_white_replace_to_red) n=int(input()) n int(input()) int input() input c=list(input()) c list(input()) list input() input from collections import Counter cnt=Counter(c) cnt Counter(c) Counter c num_of_red = cnt['R'] num_of_red cnt['R'] cnt 'R' num_of_white_replace_to_red = c[:num_of_red].count('W') num_of_white_replace_to_red c[:num_of_red].count('W') [:num_of_red].count [:num_of_red] c :num_of_red num_of_red count 'W' print(num_of_white_replace_to_red) print num_of_white_replace_to_red n=int(input()) int(input()) n c=list(input()) list(input()) c cnt=Counter(c) Counter(c) cnt num_of_red = cnt['R'] cnt['R'] num_of_red num_of_white_replace_to_red = c[:num_of_red].count('W') c[:num_of_red].count('W') num_of_white_replace_to_red
n=int(input())
c=list(input())

from collections import Counter
cnt=Counter(c)
num_of_red = cnt['R']
num_of_white_replace_to_red = c[:num_of_red].count('W')
print(num_of_white_replace_to_red)