from sys import stdin
N = int(stdin.readline().rstrip())
c = stdin.readline().rstrip()
R_cnt = c.count('R')
L_cnt = 0
for i in range(R_cnt):
  if c[i] == 'R':
    L_cnt += 1
print(R_cnt - L_cnt) from sys import stdin N = int(stdin.readline().rstrip()) N int(stdin.readline().rstrip()) int stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip c = stdin.readline().rstrip() c stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip R_cnt = c.count('R') R_cnt c.count('R') c.count c count 'R' L_cnt = 0 L_cnt 0 for i in range(R_cnt):
  if c[i] == 'R':
    L_cnt += 1 i range(R_cnt) range R_cnt if c[i] == 'R':
    L_cnt += 1 c[i] == 'R' c[i] c i 'R' L_cnt += 1 L_cnt 1 print(R_cnt - L_cnt) print R_cnt - L_cnt R_cnt L_cnt R_cnt = c.count('R') c.count('R') R_cnt c = stdin.readline().rstrip() stdin.readline().rstrip() c L_cnt += 1 1 L_cnt L_cnt = 0 0 L_cnt N = int(stdin.readline().rstrip()) int(stdin.readline().rstrip()) N
from sys import stdin
N = int(stdin.readline().rstrip())
c = stdin.readline().rstrip()
R_cnt = c.count('R')
L_cnt = 0
for i in range(R_cnt):
  if c[i] == 'R':
    L_cnt += 1
print(R_cnt - L_cnt)