const readline = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

readline.question('Input:', (input) => {
  const ans = input.split('S').map(elm => elm.length).reduce((a,b) => a > b ? a : b);
  console.log(ans);
  readline.close();
});
