function Main(input) {
 var N = input.split("");
  var num = 0;
    if(N[0]==="R"){
     if(N[1]==="R"){
       if(N[2]==="R"){
         num = 3;
       }else{
         num = 2;
       }
     }else{
       num = 1;
     }
   }else{
     if(N[1]==="R"){
       if(N[2]==="R"){
         num = 2;
       }else{
         num = 1;
       }
     }else{
       if(N[2]==="R"){
         num = 1;
       }else{
         num = 0;
       }
     }
   }
} 

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