import java.io.PrintWriter
import java.util.StringTokenizer
import kotlin.math.max

fun main() {

    fun PrintWriter.solve() {
        val s = next()
        var ans = 0
        var prev = 'R'
        var cnt = 0
        for(i in 0..2){
            if (s[i] == 'R' && prev == 'R'){
                cnt++
            }
            else if (s[i] == 'R'){
                prev = 'R'
                cnt = 1
            }
            else{
                cnt = 0
                prev = s[i]
            }

            ans = max(cnt,ans)

        }

        println(ans)

    }

    writer.solve()
    writer.flush()


}


private val reader = System.`in`.bufferedReader()
private val writer = PrintWriter(System.out, false)

private var tokenizer: StringTokenizer = StringTokenizer("")

private fun next(): String {
    while (tokenizer.hasMoreTokens().not()) tokenizer = StringTokenizer(reader.readLine())
    return tokenizer.nextToken()
}

private fun nextInt() = next().toInt()
private fun nextLong() = next().toLong()
private fun nextDouble() = next().toDouble()
private fun nextLine() = reader.readLine()

