import java.util.*;
import java.io.*;
public class Main {
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String n = sc.next();
   char[] s = n.toCharArray();
   int calc = 0;
   boolean rain = false;
   for(int i=0;i<3;i++){
     if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     }
   }
   if (rain) {
    System.out.println(calc+1);
   }
   else{
     System.out.println(0);
   }

  }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String n = sc.next();
   char[] s = n.toCharArray();
   int calc = 0;
   boolean rain = false;
   for(int i=0;i<3;i++){
     if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     }
   }
   if (rain) {
    System.out.println(calc+1);
   }
   else{
     System.out.println(0);
   }

  }
} Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String n = sc.next();
   char[] s = n.toCharArray();
   int calc = 0;
   boolean rain = false;
   for(int i=0;i<3;i++){
     if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     }
   }
   if (rain) {
    System.out.println(calc+1);
   }
   else{
     System.out.println(0);
   }

  } main {
   Scanner sc = new Scanner(System.in);
   String n = sc.next();
   char[] s = n.toCharArray();
   int calc = 0;
   boolean rain = false;
   for(int i=0;i<3;i++){
     if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     }
   }
   if (rain) {
    System.out.println(calc+1);
   }
   else{
     System.out.println(0);
   }

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String n = sc.next(); n sc.next() sc.next sc char[] s = n.toCharArray(); s n.toCharArray() n.toCharArray n int calc = 0; calc 0 boolean rain = false; rain false for(int i=0;i<3;i++){
     if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     }
   } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
     if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     }
   } {
     if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     }
   } if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     } s[i]=='R' s[i] s i 'R' {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     } rain =true rain true if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      } i<2 i 2 {
       if(s[i+1]=='R'){
         calc++;
       }
      } if(s[i+1]=='R'){
         calc++;
       } s[i+1]=='R' s[i+1] s i+1 i 1 'R' {
         calc++;
       } calc++ calc if (rain) {
    System.out.println(calc+1);
   }
   else{
     System.out.println(0);
   } rain {
    System.out.println(calc+1);
   } System.out.println(calc+1) System.out.println System.out System System.out calc+1 calc 1 {
     System.out.println(0);
   } System.out.println(0) System.out.println System.out System System.out 0 String[] args args public class Main {
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String n = sc.next();
   char[] s = n.toCharArray();
   int calc = 0;
   boolean rain = false;
   for(int i=0;i<3;i++){
     if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     }
   }
   if (rain) {
    System.out.println(calc+1);
   }
   else{
     System.out.println(0);
   }

  }
} public class Main {
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String n = sc.next();
   char[] s = n.toCharArray();
   int calc = 0;
   boolean rain = false;
   for(int i=0;i<3;i++){
     if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     }
   }
   if (rain) {
    System.out.println(calc+1);
   }
   else{
     System.out.println(0);
   }

  }
} Main
import java.util.*;
import java.io.*;
public class Main {
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String n = sc.next();
   char[] s = n.toCharArray();
   int calc = 0;
   boolean rain = false;
   for(int i=0;i<3;i++){
     if (s[i]=='R') {
       rain =true;
       if (i<2) {
       if(s[i+1]=='R'){
         calc++;
       }
      }
     }
   }
   if (rain) {
    System.out.println(calc+1);
   }
   else{
     System.out.println(0);
   }

  }
}
