import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val s = sc.next()

  if (s == "SSS") {
    println(0)
    return
  }
  if (s == "RRR") {
    println(3)
    return
  }
  if (s == "RRS" || s == "SRR") {
    println(2)
    return
  }
  println(1)


 
}
