import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			String S = scan.next();
			
		
			char one  = S.charAt(0);			
			char two  = S.charAt(1);			
			char thr  = S.charAt(2);
			
			
			int max = 0;
		
			if(one=='R') {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			}else {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			}
			
			
			System.out.println(max);
			
			
			
		}
		
	
		
	}
		

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			String S = scan.next();
			
		
			char one  = S.charAt(0);			
			char two  = S.charAt(1);			
			char thr  = S.charAt(2);
			
			
			int max = 0;
		
			if(one=='R') {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			}else {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			}
			
			
			System.out.println(max);
			
			
			
		}
		
	
		
	}
		

} Main public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			String S = scan.next();
			
		
			char one  = S.charAt(0);			
			char two  = S.charAt(1);			
			char thr  = S.charAt(2);
			
			
			int max = 0;
		
			if(one=='R') {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			}else {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			}
			
			
			System.out.println(max);
			
			
			
		}
		
	
		
	} main {
		try(Scanner scan = new Scanner(System.in)){
			
			String S = scan.next();
			
		
			char one  = S.charAt(0);			
			char two  = S.charAt(1);			
			char thr  = S.charAt(2);
			
			
			int max = 0;
		
			if(one=='R') {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			}else {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			}
			
			
			System.out.println(max);
			
			
			
		}
		
	
		
	} try(Scanner scan = new Scanner(System.in)){
			
			String S = scan.next();
			
		
			char one  = S.charAt(0);			
			char two  = S.charAt(1);			
			char thr  = S.charAt(2);
			
			
			int max = 0;
		
			if(one=='R') {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			}else {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			}
			
			
			System.out.println(max);
			
			
			
		} {
			
			String S = scan.next();
			
		
			char one  = S.charAt(0);			
			char two  = S.charAt(1);			
			char thr  = S.charAt(2);
			
			
			int max = 0;
		
			if(one=='R') {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			}else {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			}
			
			
			System.out.println(max);
			
			
			
		} Scanner scan = new Scanner(System.in) Scanner scan = new Scanner(System.in) new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan char one  = S.charAt(0); one S.charAt(0) S.charAt S 0 char two  = S.charAt(1); two S.charAt(1) S.charAt S 1 char thr  = S.charAt(2); thr S.charAt(2) S.charAt S 2 int max = 0; max 0 if(one=='R') {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			}else {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			} one=='R' one 'R' {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			} max++ max if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				} two=='R' two 'R' {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				} max++ max if(thr=='R') {
						max++;
					}else {
						
					} thr=='R' thr 'R' {
						max++;
					} max++ max {
						
					} {
					if(thr=='R') {
						
					}else {
						
					}
					
				} if(thr=='R') {
						
					}else {
						
					} thr=='R' thr 'R' {
						
					} {
						
					} {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			} if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				} two=='R' two 'R' {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				} max++ max if(thr=='R') {
						max++;
					}else {
						
					} thr=='R' thr 'R' {
						max++;
					} max++ max {
						
					} {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				} if(thr=='R') {
						max++;
					}else {
						
					} thr=='R' thr 'R' {
						max++;
					} max++ max {
						
					} System.out.println(max) System.out.println System.out System System.out max String[]args args public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			String S = scan.next();
			
		
			char one  = S.charAt(0);			
			char two  = S.charAt(1);			
			char thr  = S.charAt(2);
			
			
			int max = 0;
		
			if(one=='R') {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			}else {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			}
			
			
			System.out.println(max);
			
			
			
		}
		
	
		
	}
		

} public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			String S = scan.next();
			
		
			char one  = S.charAt(0);			
			char two  = S.charAt(1);			
			char thr  = S.charAt(2);
			
			
			int max = 0;
		
			if(one=='R') {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			}else {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			}
			
			
			System.out.println(max);
			
			
			
		}
		
	
		
	}
		

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			
			String S = scan.next();
			
		
			char one  = S.charAt(0);			
			char two  = S.charAt(1);			
			char thr  = S.charAt(2);
			
			
			int max = 0;
		
			if(one=='R') {
				
				max++;
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						
					}else {
						
					}
					
				}
			}else {
				if(two=='R') {
					max++;
					if(thr=='R') {
						max++;
					}else {
						
					}
				}else {
					if(thr=='R') {
						max++;
					}else {
						
					}
					
				}
			}
			
			
			System.out.println(max);
			
			
			
		}
		
	
		
	}
		

}
