const main = (input) => {
  const s = input.trim()

  let count = 0
  let max = 0

  for (let i=0; i<s.length; i++) {
    if (s[i] === 'R') {
      count++
      max = Math.max(max, count)
    } else count = 0

  }

  return console.log(max)
}

process.env.MYTEST ? test() : main(require('fs').readFileSync('/dev/stdin', 'utf8'))