N = int(input())
c = list(input())

#cを[R,R,R,.....,R,W,W,W,.....,W]の形にする。

div = c.count('R')

c_for = c[:div]
c_lat = c[div:]

ans = 0

replace = min(c_for.count('W'), c_lat.count('R'))
change = max(c_for.count('W'), c_lat.count('R')) - replace

ans = replace + change
#実質 ans = max(c_for.count('W'), c_lat.count('R')) やんけ！

print(ans) N = int(input()) N int(input()) int input() input c = list(input()) c list(input()) list input() input div = c.count('R') div c.count('R') c.count c count 'R' c_for = c[:div] c_for c[:div] c :div div c_lat = c[div:] c_lat c[div:] c div: div ans = 0 ans 0 replace = min(c_for.count('W'), c_lat.count('R')) replace min(c_for.count('W'), c_lat.count('R')) min c_for.count('W') c_for.count c_for count 'W' c_lat.count('R') c_lat.count c_lat count 'R' change = max(c_for.count('W'), c_lat.count('R')) - replace change max(c_for.count('W'), c_lat.count('R')) - replace max(c_for.count('W'), c_lat.count('R')) max c_for.count('W') c_for.count c_for count 'W' c_lat.count('R') c_lat.count c_lat count 'R' replace ans = replace + change ans replace + change replace change print(ans) print ans c_for = c[:div] c[:div] c_for ans = 0 0 ans change = max(c_for.count('W'), c_lat.count('R')) - replace max(c_for.count('W'), c_lat.count('R')) - replace change div = c.count('R') c.count('R') div replace = min(c_for.count('W'), c_lat.count('R')) min(c_for.count('W'), c_lat.count('R')) replace ans = replace + change replace + change ans c = list(input()) list(input()) c N = int(input()) int(input()) N c_lat = c[div:] c[div:] c_lat
N = int(input())
c = list(input())

#cを[R,R,R,.....,R,W,W,W,.....,W]の形にする。

div = c.count('R')

c_for = c[:div]
c_lat = c[div:]

ans = 0

replace = min(c_for.count('W'), c_lat.count('R'))
change = max(c_for.count('W'), c_lat.count('R')) - replace

ans = replace + change
#実質 ans = max(c_for.count('W'), c_lat.count('R')) やんけ！

print(ans)