defmodule Main do
  def main do
  
    s=IO.gets("") |> String.trim
  	cond do
      String.contains?(s,"RRR") -> IO.puts("3")
      String.contains?(s,"RR") -> IO.puts("2")
      String.contains?(s,"R") -> IO.puts("1")
      true -> IO.puts("0")
    end  
  end
end
