fun main(args: Array<String>) {
    val S = readLine()!!;
    val S3 = S.toString()

    if (S3.indexOf("RRR") >= 0) {
        println(3)
      	return 
    }
    if (S3.indexOf("RR") >= 0) {
        println(2)
      	return 
    }
    if (S3.indexOf("R") >= 0) {
        println(1)
      	return 
    }

    println(0)
  	return 
}