import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
	    Scanner s = new Scanner(System.in);
	    String st = s.nextLine();
	    
	    int cnt = 0;
	    
	    for(int i = 0; i < st.length(); i++){
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    }  
	    
	    System.out.println(cnt);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
	    Scanner s = new Scanner(System.in);
	    String st = s.nextLine();
	    
	    int cnt = 0;
	    
	    for(int i = 0; i < st.length(); i++){
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    }  
	    
	    System.out.println(cnt);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		
	    Scanner s = new Scanner(System.in);
	    String st = s.nextLine();
	    
	    int cnt = 0;
	    
	    for(int i = 0; i < st.length(); i++){
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    }  
	    
	    System.out.println(cnt);
	} main {
		// TODO Auto-generated method stub
		
	    Scanner s = new Scanner(System.in);
	    String st = s.nextLine();
	    
	    int cnt = 0;
	    
	    for(int i = 0; i < st.length(); i++){
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    }  
	    
	    System.out.println(cnt);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) String st = s.nextLine(); st s.nextLine() s.nextLine s int cnt = 0; cnt 0 for(int i = 0; i < st.length(); i++){
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    } int i = 0; int i = 0; i 0 i < st.length() i st.length() st.length st i++ i++ i {
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    } {
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    } if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break; st.charAt(i) == 'R' st.charAt(i) st.charAt st i 'R' cnt += 1 cnt 1 if(cnt != 0)
	            break; cnt != 0 cnt 0 break; System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
	    Scanner s = new Scanner(System.in);
	    String st = s.nextLine();
	    
	    int cnt = 0;
	    
	    for(int i = 0; i < st.length(); i++){
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    }  
	    
	    System.out.println(cnt);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
	    Scanner s = new Scanner(System.in);
	    String st = s.nextLine();
	    
	    int cnt = 0;
	    
	    for(int i = 0; i < st.length(); i++){
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    }  
	    
	    System.out.println(cnt);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
	    Scanner s = new Scanner(System.in);
	    String st = s.nextLine();
	    
	    int cnt = 0;
	    
	    for(int i = 0; i < st.length(); i++){
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    }  
	    
	    System.out.println(cnt);
	}

}