import java.util.*

fun main(args: Array<String>) {
    val scan = Scanner(System.`in`)
    var kotlin=scan.nextLine()
    var x = 0
    var max = 0

    for(z in kotlin)
    {
        if(z=='R')
        {
            x++
            max = Math.max(x,max)
        }
        else
            x= 0
    }
    println(max)
}
