function Main(input) {
    var result = 0;

    if (input.match("RRR")) {
        result = 3;
        
    } else if (input.match("RR")) {
        result = 2;
    } else if (input.match("R")) {
        result = 1;
    } else {
        result = 0;
    }
    console.log(result);
    
    
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));