
fun main() {
    a()
}

fun a() {
    val s = readLine()!!
    fun aa(): Int {
        if (s == "RRR") return 3
        if (s.take(2) == "RR" || s.takeLast(2) == "RR") return 2
        if (s.any { it == 'R' }) return 1
        return 0
    }
    aa().toLong().print()
}

fun readLong() = readLine()!!.toLong()
fun readLongList() = readLine()!!.split(" ").map { it.toLong() }

fun Long.bitEach(action: (Int) -> Unit) {
    (0 until Long.SIZE_BITS).forEach { action(((this shr it) and 1).toInt()) }
}

fun Long.bitFilter(bit: Int) = (0 until Long.SIZE_BITS).filter { ((this shr it) and 1) == 1L }

fun <T1, T2> pairs(first: Iterable<T1>, second: Iterable<T2>) = first.flatMap { t1 -> second.map { t2 -> t1 to t2 } }

fun Long.primeSequence() = sequence<Long> {
    var n = this@primeSequence
    if (n % 2L == 0L) {
        yield(2L)
        n /= 2L
    }
    var i = 3L
    while (n > 0) {
        if (n % i == 0L) {
            yield(i)
            n /= i
        }
        i += 2L
    }
}

fun Long.print() {
    println(this)
}