fun main(){
    val s = readLine()!!.split(" ")[0].toCharArray()
    var ans = 0
    for (i in 0 until 3){
        if (s[i] == 'R'){
            if (i == 0) ans++
            else if (ans == 0) ans++
            else if (s[i - 1] == 'R')ans++
        }
    }
    println(ans)

}