function Main(input) {
    let count = 0;
    let max = 0;
    let streak = true;
    for (i of [0, 1, 2]) {
        if (input.slice(i, i + 1) == "R") {
            count++;
            if (count > max) {
                max = count;
            }
        } else {
            count = 0;
        }
    }
    console.log(max);
}

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