"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const S = arg[0].split("");
    let answer = 0;
    let temp = 0;
    
    if(S[0] === "R") {
        temp++;
        answer = Math.max(answer, temp);
    }
    
    for(let i=1; i<S.length; i++) {
        if(S[i] === "R" && S[i-1] === "R") {
            temp++;
        }  else {
            temp = 0;
        }
        
        answer = Math.max(answer, temp);
    }
    
    if(temp === 0 && S[2] === "R") {
        temp++;
        answer = Math.max(answer, temp);
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));