console.log((args=>{
  const S = args.trim();
  if ( /RRR/.test(S) ) return 3;
  if ( /RR/.test(S) ) return 2;
  if ( /R/.test(S) ) return 1;
  return 0;
})(require('fs').readFileSync('/dev/stdin','utf8')));
