N=int(input())
S=input()
ls=[0 for _ in range(N)]
for i in range(N):
  if S[i]=='W':
    ls[i]=1
ans=0
i=0
j=N-1
while True:
  if ls[i]==1 and ls[j]==0:
    ls[i]=0
    ls[j]=1
    i+=1
    j-=1
    ans+=1
  elif ls[i]==0 and ls[j]==0:
    i+=1
  elif ls[i]==1 and ls[j]==1:
    j-=1
  else:
    i+=1
    j-=1
  if i>=j:
    break
print(ans) N=int(input()) N int(input()) int input() input S=input() S input() input 0 for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) 0 ls=[0 for _ in range(N)] ls [0 for _ in range(N)] for i in range(N):
  if S[i]=='W':
    ls[i]=1 i range(N) range N if S[i]=='W':
    ls[i]=1 S[i]=='W' S[i] S i 'W' ls[i]=1 ls[i] ls i 1 ans=0 ans 0 i=0 i 0 j=N-1 j N-1 N 1 while True:
  if ls[i]==1 and ls[j]==0:
    ls[i]=0
    ls[j]=1
    i+=1
    j-=1
    ans+=1
  elif ls[i]==0 and ls[j]==0:
    i+=1
  elif ls[i]==1 and ls[j]==1:
    j-=1
  else:
    i+=1
    j-=1
  if i>=j:
    break True if ls[i]==1 and ls[j]==0:
    ls[i]=0
    ls[j]=1
    i+=1
    j-=1
    ans+=1
  elif ls[i]==0 and ls[j]==0:
    i+=1
  elif ls[i]==1 and ls[j]==1:
    j-=1
  else:
    i+=1
    j-=1
   ls[i]==1 and ls[j]==0 ls[i]==1 ls[i] ls i 1 ls[j]==0 ls[j] ls j 0 ls[i]=0 ls[i] ls i 0 ls[j]=1 ls[j] ls j 1 i+=1 i 1 j-=1 j 1 ans+=1 ans 1 elif ls[i]==0 and ls[j]==0:
    i+=1
   ls[i]==0 and ls[j]==0 ls[i]==0 ls[i] ls i 0 ls[j]==0 ls[j] ls j 0 i+=1 i 1 elif ls[i]==1 and ls[j]==1:
    j-=1
   ls[i]==1 and ls[j]==1 ls[i]==1 ls[i] ls i 1 ls[j]==1 ls[j] ls j 1 j-=1 j 1 i+=1 i 1 j-=1 j 1 if i>=j:
    break i>=j i j break print(ans) print ans j-=1 1 j S=input() input() S ans+=1 1 ans i+=1 1 i i+=1 1 i i+=1 1 i i=0 0 i j=N-1 N-1 j j-=1 1 j ans=0 0 ans j-=1 1 j N=int(input()) int(input()) N ls=[0 for _ in range(N)] [0 for _ in range(N)] ls
N=int(input())
S=input()
ls=[0 for _ in range(N)]
for i in range(N):
  if S[i]=='W':
    ls[i]=1
ans=0
i=0
j=N-1
while True:
  if ls[i]==1 and ls[j]==0:
    ls[i]=0
    ls[j]=1
    i+=1
    j-=1
    ans+=1
  elif ls[i]==0 and ls[j]==0:
    i+=1
  elif ls[i]==1 and ls[j]==1:
    j-=1
  else:
    i+=1
    j-=1
  if i>=j:
    break
print(ans)