defmodule Main do

  def main do
    _ = IO.gets("")
    c = IO.gets("") |> String.trim() |> String.codepoints()

    r =  c |> count(0)
    r2 = c |> Enum.slice(0..r-1) |> count(0)

    r-r2 |> IO.puts()
  end

  def count([], acc), do: acc
  def count([c | t], acc) when c == "R", do: count(t, acc+1)
  def count([_ | t], acc), do: count(t, acc)
end
