function Main(input) {
  if(input.includes('RRR')){
     console.log(3)
  }else if(input.includes('RR')){
  	 console.log(2)
  }else if(input.includes('R')){
     console.log(1)
  }else{
  	 console.log(0)
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));