output_description: Print an integer representing the minimum number of operations needed.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      c_{1}c_{2}...c_{N}
attempt: import sys
  from collections import Counter
  
  
  def input():
      return sys.stdin.readline().strip()
  
  
  def list2d(a, b, c):
      return [[c] * b for i in range(a)]
  
  
  def list3d(a, b, c, d):
      return [[[d] * c for j in range(b)] for i in range(a)]
  
  
  def list4d(a, b, c, d, e):
      return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
  
  
  def ceil(x, y=1):
      return int(-(-x // y))
  
  
  def INT():
      return int(input())
  
  
  def MAP():
      return map(int, input().split())
  
  
  def LIST(N=None):
      return list(MAP()) if N is None else [INT() for i in range(N)]
  
  
  def Yes():
      print("Yes")
  
  
  def No():
      print("No")
  
  
  def YES():
      print("YES")
  
  
  def NO():
      print("NO")
  
  
  sys.setrecursionlimit(10**9)
  INF = 10**19
  MOD = 10**9 + 7
  EPS = 10**-10
  
  N = INT()
  A = list(input())
  
  C = Counter(A)
  ans = 0
  for i in range(C["R"]):
      if A[i] == "W":
          ans += 1
  print(ans)
  
problem_description: Statement
  
  An altar enshrines N stones arranged in a row from left to right. The color of
  the i-th stone from the left (1 \leq i \leq N) is given to you as a character
  c_i; `R` stands for red and `W` stands for white.
  
  You can do the following two kinds of operations any number of times in any
  order:
  
    * Choose two stones (not necessarily adjacent) and swap them.
    * Choose one stone and change its color (from red to white and vice versa).
  
  According to a fortune-teller, a white stone placed to the immediate left of a
  red stone will bring a disaster. At least how many operations are needed to
  reach a situation without such a white stone?
samples: [{"input": "4\n    WWRR", "output": "2\n    \n\nFor example, the two operations below will achieve the objective.\n\n  * Swap the 1-st and 3-rd stones from the left, resulting in `RWWR`.\n  * Change the color of the 4-th stone from the left, resulting in `RWWW`.\n\n* * *"}, {"input": "2\n    RR", "output": "0\n    \n\nIt can be the case that no operation is needed.\n\n* * *"}, {"input": "8\n    WRWWRWRR", "output": "3"}]