import java.util.Scanner;
class Main{
	public static void main(String[] args){
		
		
		int a=0;
		int b=0;
		
		Scanner sc1 = new Scanner(System.in);
 		String S = sc1.nextLine();
       		String[] str = new String[S.length()];
		for (int i = 0; i < S.length(); i++) {
   		
  		String str2 = String.valueOf(S.charAt(i));
    		
    		str[i] = str2;
		}
		for(int j=0;j<S.length();j++){
			

				if(str[j].equals("R")){
					a++;
					b=a;
				}
				else if(str[j].equals("S")){
					a=0;
					
				}
		}
		
					
				
			
			
		
				
				
				
			
		
		System.out.println(b);
	}
}
		

		 import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args){
		
		
		int a=0;
		int b=0;
		
		Scanner sc1 = new Scanner(System.in);
 		String S = sc1.nextLine();
       		String[] str = new String[S.length()];
		for (int i = 0; i < S.length(); i++) {
   		
  		String str2 = String.valueOf(S.charAt(i));
    		
    		str[i] = str2;
		}
		for(int j=0;j<S.length();j++){
			

				if(str[j].equals("R")){
					a++;
					b=a;
				}
				else if(str[j].equals("S")){
					a=0;
					
				}
		}
		
					
				
			
			
		
				
				
				
			
		
		System.out.println(b);
	}
} Main public static void main(String[] args){
		
		
		int a=0;
		int b=0;
		
		Scanner sc1 = new Scanner(System.in);
 		String S = sc1.nextLine();
       		String[] str = new String[S.length()];
		for (int i = 0; i < S.length(); i++) {
   		
  		String str2 = String.valueOf(S.charAt(i));
    		
    		str[i] = str2;
		}
		for(int j=0;j<S.length();j++){
			

				if(str[j].equals("R")){
					a++;
					b=a;
				}
				else if(str[j].equals("S")){
					a=0;
					
				}
		}
		
					
				
			
			
		
				
				
				
			
		
		System.out.println(b);
	} main {
		
		
		int a=0;
		int b=0;
		
		Scanner sc1 = new Scanner(System.in);
 		String S = sc1.nextLine();
       		String[] str = new String[S.length()];
		for (int i = 0; i < S.length(); i++) {
   		
  		String str2 = String.valueOf(S.charAt(i));
    		
    		str[i] = str2;
		}
		for(int j=0;j<S.length();j++){
			

				if(str[j].equals("R")){
					a++;
					b=a;
				}
				else if(str[j].equals("S")){
					a=0;
					
				}
		}
		
					
				
			
			
		
				
				
				
			
		
		System.out.println(b);
	} int a=0; a 0 int b=0; b 0 Scanner sc1 = new Scanner(System.in); sc1 new Scanner(System.in) String S = sc1.nextLine(); S sc1.nextLine() sc1.nextLine sc1 String[] str = new String[S.length()]; str new String[S.length()] S.length() S.length S for (int i = 0; i < S.length(); i++) {
   		
  		String str2 = String.valueOf(S.charAt(i));
    		
    		str[i] = str2;
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
   		
  		String str2 = String.valueOf(S.charAt(i));
    		
    		str[i] = str2;
		} {
   		
  		String str2 = String.valueOf(S.charAt(i));
    		
    		str[i] = str2;
		} String str2 = String.valueOf(S.charAt(i)); str2 String.valueOf(S.charAt(i)) String.valueOf String S.charAt(i) S.charAt S i str[i] = str2 str[i] str i str2 for(int j=0;j<S.length();j++){
			

				if(str[j].equals("R")){
					a++;
					b=a;
				}
				else if(str[j].equals("S")){
					a=0;
					
				}
		} int j=0; int j=0; j 0 j<S.length() j S.length() S.length S j++ j++ j {
			

				if(str[j].equals("R")){
					a++;
					b=a;
				}
				else if(str[j].equals("S")){
					a=0;
					
				}
		} {
			

				if(str[j].equals("R")){
					a++;
					b=a;
				}
				else if(str[j].equals("S")){
					a=0;
					
				}
		} if(str[j].equals("R")){
					a++;
					b=a;
				}
				else if(str[j].equals("S")){
					a=0;
					
				} str[j].equals("R") str[j].equals str[j] str j "R" {
					a++;
					b=a;
				} a++ a b=a b a if(str[j].equals("S")){
					a=0;
					
				} str[j].equals("S") str[j].equals str[j] str j "S" {
					a=0;
					
				} a=0 a 0 System.out.println(b) System.out.println System.out System System.out b String[] args args
import java.util.Scanner;
class Main{
	public static void main(String[] args){
		
		
		int a=0;
		int b=0;
		
		Scanner sc1 = new Scanner(System.in);
 		String S = sc1.nextLine();
       		String[] str = new String[S.length()];
		for (int i = 0; i < S.length(); i++) {
   		
  		String str2 = String.valueOf(S.charAt(i));
    		
    		str[i] = str2;
		}
		for(int j=0;j<S.length();j++){
			

				if(str[j].equals("R")){
					a++;
					b=a;
				}
				else if(str[j].equals("S")){
					a=0;
					
				}
		}
		
					
				
			
			
		
				
				
				
			
		
		System.out.println(b);
	}
}
		

		
