import io.StdIn.{readInt, readLine}
object Main extends App {
  val s = readLine

  val result = if (s.contains("S") && s.contains("R"))
                s.split("S").map(_.length).max
               else 
                s.count(_ == "R")

  println(result)
}