function main(lines) {
  const S = lines[0];

  let ans = 0;
  if (S == 'RRR') ans = 3;
  else if (S.includes('RR')) ans = 2;
  else if (S.includes('R')) ans = 1;
  
  return ans;
}


const ans = main( require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n") );
console.log( ans );

function splitN(s) {
  return s.split(' ').map(Number);
}
