fun main() {
    val s = readLine()!!
    var count = 0
    if (s.isNotBlank()) {
        if (s[0] == 'R' && s[1] == 'R' && s[2] == 'R') count = 3
        else if (s[0] == 'R' && s[1] == 'R') count = 2
        else if (s[1] == 'R' && s[2] == 'R') count = 2
        else if (s.contains('R')) count = 1
    }
    println(count)
}