function main(input){
  input = input.split('\n');


  if(input[0].indexOf('RRR') != -1){
    console.log('3');
  } else if (input[0].indexOf('RR') != -1){
    console.log('2');
  } else if(input[0].indexOf('R') != -1){
    console.log('1');
  }else{
    console.log('0');
  }

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