fun main () {
    val list: MutableList<String> = readLine()!!.split("").filter { it != "" } as MutableList<String>
    var count = 0
    var bool = false
    for (string in list) {

        if (string == "R") {
            if (bool) {
                count++
            } else {
                count = 1
                bool = true
            }
        } else {
            bool = false
        }

    }
    println(count)
}