const Main = (input) => {
  const line = input.split('\n')
  const weather = line[0].toString()
  let count = 0

  if (weather.match(/R/g)) { 
    count = 1
  }
  if (weather.match(/RR/g)) { 
    count = 2
  }

  console.log(count)
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))