"use strict";

const main = arg => {
    const inputList = arg.trim().split("\n");
    // 回答を記述
    const S = inputList[0];
    let count = 0;
    let SList = S.split('');
    if (SList[0] === 'R') {
        if (SList[1] === 'R') {
            if (SList[2] === 'R') {
                count = 3;
            } else {
                count = 2;
            }
        } else {
            count = 1;
        }
    } else {
        if (SList[1] === 'R') {
            if (SList[2] === 'R') {
                count = 2;
            } else {
                count = 1;
            }
        } else {
            if (SList[2] === 'R') {
                count = 1;
            }
        }
    }
    console.log(count)

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