import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		String s = sc.next();
        int ans = 0;
        int count = 0;
        for(int i=0;i<3;i++){if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;}
                            }        
		System.out.println(Math.max(ans,count));
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		String s = sc.next();
        int ans = 0;
        int count = 0;
        for(int i=0;i<3;i++){if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;}
                            }        
		System.out.println(Math.max(ans,count));
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		String s = sc.next();
        int ans = 0;
        int count = 0;
        for(int i=0;i<3;i++){if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;}
                            }        
		System.out.println(Math.max(ans,count));
	} main {
		Scanner sc = new Scanner(System.in);		
		String s = sc.next();
        int ans = 0;
        int count = 0;
        for(int i=0;i<3;i++){if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;}
                            }        
		System.out.println(Math.max(ans,count));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int ans = 0; ans 0 int count = 0; count 0 for(int i=0;i<3;i++){if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;}
                            } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;}
                            } {if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;}
                            } if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;} s.charAt(i)=='R' s.charAt(i) s.charAt s i 'R' {count++;} count++ count {ans=Math.max(ans,count);
                                 count=0;} ans=Math.max(ans,count) ans Math.max(ans,count) Math.max Math ans count count=0 count 0 System.out.println(Math.max(ans,count)) System.out.println System.out System System.out Math.max(ans,count) Math.max Math ans count String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		String s = sc.next();
        int ans = 0;
        int count = 0;
        for(int i=0;i<3;i++){if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;}
                            }        
		System.out.println(Math.max(ans,count));
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		String s = sc.next();
        int ans = 0;
        int count = 0;
        for(int i=0;i<3;i++){if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;}
                            }        
		System.out.println(Math.max(ans,count));
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
		String s = sc.next();
        int ans = 0;
        int count = 0;
        for(int i=0;i<3;i++){if(s.charAt(i)=='R'){count++;}
                             else{ans=Math.max(ans,count);
                                 count=0;}
                            }        
		System.out.println(Math.max(ans,count));
	}
}