N = int(input())
C=list(input())
type=set(C)
L=0
R=0
RR=0
X=0
if 'R' in type and 'W' in type:
    for L in range(N):
      R=RR
      if L>=N-1-R:
        break
      if C[L]=='W':
          for ii in range(N-L-R):
            if C[N-1-R-ii]=='R':
              C[L]='R'
              C[N-1-R-ii]='W'
              X+=1
              break
            RR+=1
            if L>=N-1-R:
              break
print(X) N = int(input()) N int(input()) int input() input C=list(input()) C list(input()) list input() input type=set(C) type set(C) set C L=0 L 0 R=0 R 0 RR=0 RR 0 X=0 X 0 if 'R' in type and 'W' in type:
    for L in range(N):
      R=RR
      if L>=N-1-R:
        break
      if C[L]=='W':
          for ii in range(N-L-R):
            if C[N-1-R-ii]=='R':
              C[L]='R'
              C[N-1-R-ii]='W'
              X+=1
              break
            RR+=1
            if L>=N-1-R:
              break 'R' in type and 'W' in type 'R' in type 'R' type 'W' in type 'W' type for L in range(N):
      R=RR
      if L>=N-1-R:
        break
      if C[L]=='W':
          for ii in range(N-L-R):
            if C[N-1-R-ii]=='R':
              C[L]='R'
              C[N-1-R-ii]='W'
              X+=1
              break
            RR+=1
            if L>=N-1-R:
              break L range(N) range N R=RR R RR if L>=N-1-R:
        break
       L>=N-1-R L N-1-R N-1 N 1 R break if C[L]=='W':
          for ii in range(N-L-R):
            if C[N-1-R-ii]=='R':
              C[L]='R'
              C[N-1-R-ii]='W'
              X+=1
              break
            RR+=1
            if L>=N-1-R:
              break C[L]=='W' C[L] C L 'W' for ii in range(N-L-R):
            if C[N-1-R-ii]=='R':
              C[L]='R'
              C[N-1-R-ii]='W'
              X+=1
              break
            RR+=1
            if L>=N-1-R:
              break ii range(N-L-R) range N-L-R N-L N L R if C[N-1-R-ii]=='R':
              C[L]='R'
              C[N-1-R-ii]='W'
              X+=1
              break
             C[N-1-R-ii]=='R' C[N-1-R-ii] C N-1-R-ii N-1-R N-1 N 1 R ii 'R' C[L]='R' C[L] C L 'R' C[N-1-R-ii]='W' C[N-1-R-ii] C N-1-R-ii N-1-R N-1 N 1 R ii 'W' X+=1 X 1 break RR+=1 RR 1 if L>=N-1-R:
              break L>=N-1-R L N-1-R N-1 N 1 R break print(X) print X R=RR RR R type=set(C) set(C) type N = int(input()) int(input()) N RR=0 0 RR X+=1 1 X R=0 0 R X=0 0 X C=list(input()) list(input()) C L=0 0 L RR+=1 1 RR
N = int(input())
C=list(input())
type=set(C)
L=0
R=0
RR=0
X=0
if 'R' in type and 'W' in type:
    for L in range(N):
      R=RR
      if L>=N-1-R:
        break
      if C[L]=='W':
          for ii in range(N-L-R):
            if C[N-1-R-ii]=='R':
              C[L]='R'
              C[N-1-R-ii]='W'
              X+=1
              break
            RR+=1
            if L>=N-1-R:
              break
print(X)