ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n=ni()
c = [1 if _ == 'R' else 0 for _ in input()]
b = sum(c)

w=0
r=0

for i in range(n):
  if c[i] == 0 and i < b:
    r+=1
  if c[i] == 1 and i >= b:
    w+=1
 

print(max(w,r))

 ni = lambda: int(input()) ni lambda: int(input()) int(input()) int input() input nm = lambda: map(int, input().split()) nm lambda: map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split nl = lambda: list(map(int, input().split())) nl lambda: list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split n=ni() n ni() ni 1 if _ == 'R' else 0 for _ in input() for _ in input() _ input() input for _ in input() 1 if _ == 'R' else 0 _ == 'R' _ 'R' 1 0 c = [1 if _ == 'R' else 0 for _ in input()] c [1 if _ == 'R' else 0 for _ in input()] b = sum(c) b sum(c) sum c w=0 w 0 r=0 r 0 for i in range(n):
  if c[i] == 0 and i < b:
    r+=1
  if c[i] == 1 and i >= b:
    w+=1
  i range(n) range n if c[i] == 0 and i < b:
    r+=1
   c[i] == 0 and i < b c[i] == 0 c[i] c i 0 i < b i b r+=1 r 1 if c[i] == 1 and i >= b:
    w+=1
  c[i] == 1 and i >= b c[i] == 1 c[i] c i 1 i >= b i b w+=1 w 1 print(max(w,r)) print max(w,r) max w r ni = lambda: int(input()) lambda: int(input()) ni w+=1 1 w n=ni() ni() n w=0 0 w nl = lambda: list(map(int, input().split())) lambda: list(map(int, input().split())) nl b = sum(c) sum(c) b r=0 0 r nm = lambda: map(int, input().split()) lambda: map(int, input().split()) nm c = [1 if _ == 'R' else 0 for _ in input()] [1 if _ == 'R' else 0 for _ in input()] c r+=1 1 r
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n=ni()
c = [1 if _ == 'R' else 0 for _ in input()]
b = sum(c)

w=0
r=0

for i in range(n):
  if c[i] == 0 and i < b:
    r+=1
  if c[i] == 1 and i >= b:
    w+=1
 

print(max(w,r))


