import scala.io.StdIn._

object Main extends App {

  val s = readLine()
  def solve() = {
    if(s == "RRR") 3
    else if(s == "RRS" || s == "SRR") 2
    else if(s.contains("R")) 1
    else 0
  }

  println(solve())

}

