fun main(){
    val S = readLine()!!.split("").filter { it != "" }

    var count = 0

    if(S[0] == "R"){
        count++
        if(S[1] == "R"){
            count++
            if(S[2] == "R"){
                count++
            }
        }
    }else if(S[1] == "R"){
        count++
        if(S[2] == "R"){
            count++
        }
    }else if(S[2] == "R"){
        count++
    }
    println(count)
}