N = int(input())
c = list(input())
w = 0
r = N-1
ans = 0
while w < r:
    for i in range(w,r):
        if c[i] == "W":
            c[i] = "R"
            w = i
            break
    else:
        break
    for j in range(r,w,-1):
        if c[j] == "R":
            c[j] = "W"
            r = j
            break
    else:
        break
    ans += 1
print(ans) N = int(input()) N int(input()) int input() input c = list(input()) c list(input()) list input() input w = 0 w 0 r = N-1 r N-1 N 1 ans = 0 ans 0 while w < r:
    for i in range(w,r):
        if c[i] == "W":
            c[i] = "R"
            w = i
            break
    else:
        break
    for j in range(r,w,-1):
        if c[j] == "R":
            c[j] = "W"
            r = j
            break
    else:
        break
    ans += 1 w < r w r for i in range(w,r):
        if c[i] == "W":
            c[i] = "R"
            w = i
            break
    else:
        break
     i range(w,r) range w r if c[i] == "W":
            c[i] = "R"
            w = i
            break
     c[i] == "W" c[i] c i "W" c[i] = "R" c[i] c i "R" w = i w i break break for j in range(r,w,-1):
        if c[j] == "R":
            c[j] = "W"
            r = j
            break
    else:
        break
     j range(r,w,-1) range r w -1 if c[j] == "R":
            c[j] = "W"
            r = j
            break
     c[j] == "R" c[j] c j "R" c[j] = "W" c[j] c j "W" r = j r j break break ans += 1 ans 1 print(ans) print ans ans += 1 1 ans r = N-1 N-1 r N = int(input()) int(input()) N r = j j r w = 0 0 w w = i i w ans = 0 0 ans c = list(input()) list(input()) c
N = int(input())
c = list(input())
w = 0
r = N-1
ans = 0
while w < r:
    for i in range(w,r):
        if c[i] == "W":
            c[i] = "R"
            w = i
            break
    else:
        break
    for j in range(r,w,-1):
        if c[j] == "R":
            c[j] = "W"
            r = j
            break
    else:
        break
    ans += 1
print(ans)