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

ans = allrcnt-rcnt

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

ans = allrcnt-rcnt

print(ans)