n = int(input())
a = list(input())
cnt_r = n-1
cnt_l = 0
cnt = 0
while True:
  if cnt_r == cnt_l:
    print(cnt)
    exit()
  if a[cnt_r] == 'W':
    cnt_r -= 1
    continue
  if a[cnt_l] == 'R':
    cnt_l += 1
    continue
  a[cnt_r], a[cnt_l] = a[cnt_l], a[cnt_r]
  cnt += 1 n = int(input()) n int(input()) int input() input a = list(input()) a list(input()) list input() input cnt_r = n-1 cnt_r n-1 n 1 cnt_l = 0 cnt_l 0 cnt = 0 cnt 0 while True:
  if cnt_r == cnt_l:
    print(cnt)
    exit()
  if a[cnt_r] == 'W':
    cnt_r -= 1
    continue
  if a[cnt_l] == 'R':
    cnt_l += 1
    continue
  a[cnt_r], a[cnt_l] = a[cnt_l], a[cnt_r]
  cnt += 1 True if cnt_r == cnt_l:
    print(cnt)
    exit()
   cnt_r == cnt_l cnt_r cnt_l print(cnt) print cnt exit() exit if a[cnt_r] == 'W':
    cnt_r -= 1
    continue
   a[cnt_r] == 'W' a[cnt_r] a cnt_r 'W' cnt_r -= 1 cnt_r 1 continue if a[cnt_l] == 'R':
    cnt_l += 1
    continue
   a[cnt_l] == 'R' a[cnt_l] a cnt_l 'R' cnt_l += 1 cnt_l 1 continue a[cnt_r], a[cnt_l] = a[cnt_l], a[cnt_r] a[cnt_r] a cnt_r a[cnt_l] a cnt_l a[cnt_l] a cnt_l a[cnt_r] a cnt_r cnt += 1 cnt 1 a = list(input()) list(input()) a cnt_l += 1 1 cnt_l cnt_l = 0 0 cnt_l cnt_r -= 1 1 cnt_r cnt += 1 1 cnt n = int(input()) int(input()) n cnt = 0 0 cnt cnt_r = n-1 n-1 cnt_r
n = int(input())
a = list(input())
cnt_r = n-1
cnt_l = 0
cnt = 0
while True:
  if cnt_r == cnt_l:
    print(cnt)
    exit()
  if a[cnt_r] == 'W':
    cnt_r -= 1
    continue
  if a[cnt_l] == 'R':
    cnt_l += 1
    continue
  a[cnt_r], a[cnt_l] = a[cnt_l], a[cnt_r]
  cnt += 1