N = int(input())
C = input()
answer = 0

for i in range(N):
    if C[i] == 'W':
        red_start = i
        break
    if i == N-1:
        red_start = N-1

for i in range(1, N+1):
    if C[-i] == 'R':
        white_start = i
        break
    if i == N:
        white_start = N

red_pos = red_start
white_pos = white_start    

while red_pos + white_pos < N:
    answer += 1
    for i in range(red_pos+1, N):
        if C[i] == 'W':
            red_pos = i
            break
        if i == N-1:
            red_pos = N-1
    for i in range(white_pos+1, N+1):
        if C[-i] == 'R':
            white_pos = i
            break
        if i == N:
            white_pos = N

print(answer) N = int(input()) N int(input()) int input() input C = input() C input() input answer = 0 answer 0 for i in range(N):
    if C[i] == 'W':
        red_start = i
        break
    if i == N-1:
        red_start = N-1 i range(N) range N if C[i] == 'W':
        red_start = i
        break
     C[i] == 'W' C[i] C i 'W' red_start = i red_start i break if i == N-1:
        red_start = N-1 i == N-1 i N-1 N 1 red_start = N-1 red_start N-1 N 1 for i in range(1, N+1):
    if C[-i] == 'R':
        white_start = i
        break
    if i == N:
        white_start = N i range(1, N+1) range 1 N+1 N 1 if C[-i] == 'R':
        white_start = i
        break
     C[-i] == 'R' C[-i] C -i i 'R' white_start = i white_start i break if i == N:
        white_start = N i == N i N white_start = N white_start N red_pos = red_start red_pos red_start white_pos = white_start white_pos white_start while red_pos + white_pos < N:
    answer += 1
    for i in range(red_pos+1, N):
        if C[i] == 'W':
            red_pos = i
            break
        if i == N-1:
            red_pos = N-1
    for i in range(white_pos+1, N+1):
        if C[-i] == 'R':
            white_pos = i
            break
        if i == N:
            white_pos = N red_pos + white_pos < N red_pos + white_pos red_pos white_pos N answer += 1 answer 1 for i in range(red_pos+1, N):
        if C[i] == 'W':
            red_pos = i
            break
        if i == N-1:
            red_pos = N-1
     i range(red_pos+1, N) range red_pos+1 red_pos 1 N if C[i] == 'W':
            red_pos = i
            break
         C[i] == 'W' C[i] C i 'W' red_pos = i red_pos i break if i == N-1:
            red_pos = N-1
     i == N-1 i N-1 N 1 red_pos = N-1 red_pos N-1 N 1 for i in range(white_pos+1, N+1):
        if C[-i] == 'R':
            white_pos = i
            break
        if i == N:
            white_pos = N i range(white_pos+1, N+1) range white_pos+1 white_pos 1 N+1 N 1 if C[-i] == 'R':
            white_pos = i
            break
         C[-i] == 'R' C[-i] C -i i 'R' white_pos = i white_pos i break if i == N:
            white_pos = N i == N i N white_pos = N white_pos N print(answer) print answer white_pos = i i white_pos white_start = i i white_start red_pos = N-1 N-1 red_pos answer = 0 0 answer C = input() input() C white_pos = white_start white_start white_pos red_start = N-1 N-1 red_start N = int(input()) int(input()) N red_start = i i red_start red_pos = i i red_pos white_pos = N N white_pos white_start = N N white_start red_pos = red_start red_start red_pos answer += 1 1 answer
N = int(input())
C = input()
answer = 0

for i in range(N):
    if C[i] == 'W':
        red_start = i
        break
    if i == N-1:
        red_start = N-1

for i in range(1, N+1):
    if C[-i] == 'R':
        white_start = i
        break
    if i == N:
        white_start = N

red_pos = red_start
white_pos = white_start    

while red_pos + white_pos < N:
    answer += 1
    for i in range(red_pos+1, N):
        if C[i] == 'W':
            red_pos = i
            break
        if i == N-1:
            red_pos = N-1
    for i in range(white_pos+1, N+1):
        if C[-i] == 'R':
            white_pos = i
            break
        if i == N:
            white_pos = N

print(answer)