N = int(input())
words = list(input())
ct_R = words.count('R')
ct_W = words.count('W')
a = words[0:ct_R]
W_in_a_count = a.count('W')
print(W_in_a_count) N = int(input()) N int(input()) int input() input words = list(input()) words list(input()) list input() input ct_R = words.count('R') ct_R words.count('R') words.count words count 'R' ct_W = words.count('W') ct_W words.count('W') words.count words count 'W' a = words[0:ct_R] a words[0:ct_R] words 0:ct_R 0 ct_R W_in_a_count = a.count('W') W_in_a_count a.count('W') a.count a count 'W' print(W_in_a_count) print W_in_a_count N = int(input()) int(input()) N words = list(input()) list(input()) words ct_W = words.count('W') words.count('W') ct_W ct_R = words.count('R') words.count('R') ct_R a = words[0:ct_R] words[0:ct_R] a W_in_a_count = a.count('W') a.count('W') W_in_a_count
N = int(input())
words = list(input())
ct_R = words.count('R')
ct_W = words.count('W')
a = words[0:ct_R]
W_in_a_count = a.count('W')
print(W_in_a_count)
