N = int(input())
a = input()
wc = int(0)
rc = int(0)
c = int(0)

for i in range(N):
  if a[i] == "W":
    wc += 1
  else:
    rc += 1

if rc == 0:
  print("0")
else:
  for i in range(rc):
    if a[i] == "W":
      c += 1
  print(c) N = int(input()) N int(input()) int input() input a = input() a input() input wc = int(0) wc int(0) int 0 rc = int(0) rc int(0) int 0 c = int(0) c int(0) int 0 for i in range(N):
  if a[i] == "W":
    wc += 1
  else:
    rc += 1 i range(N) range N if a[i] == "W":
    wc += 1
  else:
    rc += 1 a[i] == "W" a[i] a i "W" wc += 1 wc 1 rc += 1 rc 1 if rc == 0:
  print("0")
else:
  for i in range(rc):
    if a[i] == "W":
      c += 1
  print(c) rc == 0 rc 0 print("0") print "0" for i in range(rc):
    if a[i] == "W":
      c += 1
   i range(rc) range rc if a[i] == "W":
      c += 1
   a[i] == "W" a[i] a i "W" c += 1 c 1 print(c) print c N = int(input()) int(input()) N c += 1 1 c rc += 1 1 rc a = input() input() a rc = int(0) int(0) rc c = int(0) int(0) c wc = int(0) int(0) wc wc += 1 1 wc
N = int(input())
a = input()
wc = int(0)
rc = int(0)
c = int(0)

for i in range(N):
  if a[i] == "W":
    wc += 1
  else:
    rc += 1

if rc == 0:
  print("0")
else:
  for i in range(rc):
    if a[i] == "W":
      c += 1
  print(c)