"use strict"
function main(arg) {
    let data = arg.trim().split("\n")[0].split("")
    let max = 0
    let counter = 0
    for (let i = 0; i < data.length; i++) {
        if (data[i] === 'R') {
            counter++
            max = Math.max(max, counter)
        } else {
            counter = 0
        }
    }
    console.log(max)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));