fun main(args: Array<String>) {
    var out = 0
    var run = 0
    readLine()?.forEach {
        if (it == 'R') {
            run++
            out = Math.max(out, run)
        } else {
            run = 0
        }
    }
    println(out)
}