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