import scala.io.StdIn._
object Main {
  def main(args:Array[String]) {
    val S = readLine()
    if(S.contains("RRR")) println(3)
    else if(S.contains("RR")) println(2)
    else if(S.contains("R")) println(1)
    else println(0)
  }
}
