function Main(arg) {
  let S = arg.trim();
  let ret = 1;
  if(S == 'RRR'){
    ret = 3;
  } else if (S.indexOf('RR') > -1){
    ret = 2;
  } else if(S == 'SSS'){
    ret = 0;
  }
  console.log(ret);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));