n = int(input())
c = input()

wr = c.count('WR')
r = c.count('R')
w = c.count('W')

if wr == 0:
    print(0)
else:
    c_sorted = 'R'*r + 'W'*w
    ans = 0
    for i in range(n):
        if c[i] != c_sorted[i]:
            ans += 1
        else:
            ans += 0
    print(ans//2) n = int(input()) n int(input()) int input() input c = input() c input() input wr = c.count('WR') wr c.count('WR') c.count c count 'WR' r = c.count('R') r c.count('R') c.count c count 'R' w = c.count('W') w c.count('W') c.count c count 'W' if wr == 0:
    print(0)
else:
    c_sorted = 'R'*r + 'W'*w
    ans = 0
    for i in range(n):
        if c[i] != c_sorted[i]:
            ans += 1
        else:
            ans += 0
    print(ans//2) wr == 0 wr 0 print(0) print 0 c_sorted = 'R'*r + 'W'*w c_sorted 'R'*r + 'W'*w 'R'*r 'R' r 'W'*w 'W' w ans = 0 ans 0 for i in range(n):
        if c[i] != c_sorted[i]:
            ans += 1
        else:
            ans += 0
     i range(n) range n if c[i] != c_sorted[i]:
            ans += 1
        else:
            ans += 0
     c[i] != c_sorted[i] c[i] c i c_sorted[i] c_sorted i ans += 1 ans 1 ans += 0 ans 0 print(ans//2) print ans//2 ans 2 wr = c.count('WR') c.count('WR') wr ans += 1 1 ans ans += 0 0 ans n = int(input()) int(input()) n c = input() input() c w = c.count('W') c.count('W') w c_sorted = 'R'*r + 'W'*w 'R'*r + 'W'*w c_sorted r = c.count('R') c.count('R') r ans = 0 0 ans
n = int(input())
c = input()

wr = c.count('WR')
r = c.count('R')
w = c.count('W')

if wr == 0:
    print(0)
else:
    c_sorted = 'R'*r + 'W'*w
    ans = 0
    for i in range(n):
        if c[i] != c_sorted[i]:
            ans += 1
        else:
            ans += 0
    print(ans//2)