function main(arg) {
    let s = arg.split("")

    let ans=0, max=0
    for(let i=0;i <3; i++) {
        if(s[i]==="R") {
            ans++
        } else {
            ans=0
        }
        max=Math.max(max,ans)
    }
    console.log(max)
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
