import java.util.Scanner;
import java.util.Stack;

public class Main {
	static int[][] numbers;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		String S = in.next();
        int max = 0;
         for(int i =0; i< 3; i++)  {
          int prev = S.charAt(i);
          if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          }
        	       			 		
         }
         System.out.println(max);     
	}
	
	
} import java.util.Scanner; Scanner java.util import java.util.Stack; Stack java.util public class Main {
	static int[][] numbers;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		String S = in.next();
        int max = 0;
         for(int i =0; i< 3; i++)  {
          int prev = S.charAt(i);
          if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          }
        	       			 		
         }
         System.out.println(max);     
	}
	
	
} Main static int[][] numbers; numbers public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		String S = in.next();
        int max = 0;
         for(int i =0; i< 3; i++)  {
          int prev = S.charAt(i);
          if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          }
        	       			 		
         }
         System.out.println(max);     
	} main {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		String S = in.next();
        int max = 0;
         for(int i =0; i< 3; i++)  {
          int prev = S.charAt(i);
          if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          }
        	       			 		
         }
         System.out.println(max);     
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) String S = in.next(); S in.next() in.next in int max = 0; max 0 for(int i =0; i< 3; i++)  {
          int prev = S.charAt(i);
          if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          }
        	       			 		
         } int i =0; int i =0; i 0 i< 3 i 3 i++ i++ i {
          int prev = S.charAt(i);
          if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          }
        	       			 		
         } {
          int prev = S.charAt(i);
          if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          }
        	       			 		
         } int prev = S.charAt(i); prev S.charAt(i) S.charAt S i if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          } prev=='R' prev 'R' {
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          } int to =1; to 1 for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              } int j =i+1; int j =i+1; j i+1 i 1 j<3 j 3 j++ j++ j {
                 if(prev!=S.charAt(j)) break;
                to++;
              } {
                 if(prev!=S.charAt(j)) break;
                to++;
              } if(prev!=S.charAt(j)) break; prev!=S.charAt(j) prev S.charAt(j) S.charAt S j break; to++ to max = Math.max(max, to) max Math.max(max, to) Math.max Math max to System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
	static int[][] numbers;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		String S = in.next();
        int max = 0;
         for(int i =0; i< 3; i++)  {
          int prev = S.charAt(i);
          if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          }
        	       			 		
         }
         System.out.println(max);     
	}
	
	
} public class Main {
	static int[][] numbers;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		String S = in.next();
        int max = 0;
         for(int i =0; i< 3; i++)  {
          int prev = S.charAt(i);
          if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          }
        	       			 		
         }
         System.out.println(max);     
	}
	
	
} Main
import java.util.Scanner;
import java.util.Stack;

public class Main {
	static int[][] numbers;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		String S = in.next();
        int max = 0;
         for(int i =0; i< 3; i++)  {
          int prev = S.charAt(i);
          if(prev=='R'){
        	  int to =1;
              for(int j =i+1; j<3; j++)  {
                 if(prev!=S.charAt(j)) break;
                to++;
              }
              max = Math.max(max, to); 
          }
        	       			 		
         }
         System.out.println(max);     
	}
	
	
}