object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val s = sc.next

  if (s.contains("RRR")) {
    println("3")
  } else if (s.contains("RR")) {
    println("2")
  } else if (s.contains("R")) {
    println("1")
  } else {
    println("0")
  }
}
