function Main(input) {
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});
    let S = input[0][0];
    let ans = 0;
    if (S === 'RSR' || S === 'RSS'|| S === 'SRS' || S === 'SSR') ans = 1;
    else if (S === 'RRS' || S === 'SRR') ans = 2;
    else if (S === 'RRR') ans = 3;
    console.log(ans);

}


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