defmodule Main do
  def main do
    s =
      IO.read(:line)
      |> String.trim
    if s == "RSR" do
    	IO.puts(1)
    else
		s |> to_char_list |> Enum.filter(fn x -> x == ?R end) |> length |> IO.puts
        end
  end
end
