import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val S = sc.nextLine

  val z = if (S == "RRR") 3 else if (S.contains("RR")) 2 else if (S.contains("R")) 1 else 0

  println(z)
}
