n = int(input())
c = list(input())
hrcnt = 0
rcnt = 0
for i in range(len(c)):
    if c[i]=='R':
        rcnt += 1
for i in range(len(c)):
    if i+1<=rcnt and c[i]=='R':
        hrcnt += 1

wcnt = len(c)-rcnt
if rcnt==len(c) or rcnt==0:
    ans = 0
else:
    ans = rcnt-hrcnt

print(ans) n = int(input()) n int(input()) int input() input c = list(input()) c list(input()) list input() input hrcnt = 0 hrcnt 0 rcnt = 0 rcnt 0 for i in range(len(c)):
    if c[i]=='R':
        rcnt += 1 i range(len(c)) range len(c) len c if c[i]=='R':
        rcnt += 1 c[i]=='R' c[i] c i 'R' rcnt += 1 rcnt 1 for i in range(len(c)):
    if i+1<=rcnt and c[i]=='R':
        hrcnt += 1 i range(len(c)) range len(c) len c if i+1<=rcnt and c[i]=='R':
        hrcnt += 1 i+1<=rcnt and c[i]=='R' i+1<=rcnt i+1 i 1 rcnt c[i]=='R' c[i] c i 'R' hrcnt += 1 hrcnt 1 wcnt = len(c)-rcnt wcnt len(c)-rcnt len(c) len c rcnt if rcnt==len(c) or rcnt==0:
    ans = 0
else:
    ans = rcnt-hrcnt rcnt==len(c) or rcnt==0 rcnt==len(c) rcnt len(c) len c rcnt==0 rcnt 0 ans = 0 ans 0 ans = rcnt-hrcnt ans rcnt-hrcnt rcnt hrcnt print(ans) print ans ans = rcnt-hrcnt rcnt-hrcnt ans ans = 0 0 ans hrcnt = 0 0 hrcnt rcnt = 0 0 rcnt rcnt += 1 1 rcnt wcnt = len(c)-rcnt len(c)-rcnt wcnt n = int(input()) int(input()) n c = list(input()) list(input()) c hrcnt += 1 1 hrcnt
n = int(input())
c = list(input())
hrcnt = 0
rcnt = 0
for i in range(len(c)):
    if c[i]=='R':
        rcnt += 1
for i in range(len(c)):
    if i+1<=rcnt and c[i]=='R':
        hrcnt += 1

wcnt = len(c)-rcnt
if rcnt==len(c) or rcnt==0:
    ans = 0
else:
    ans = rcnt-hrcnt

print(ans)