import java.util.Scanner;

 
public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		char[] s  = sc.nextLine().toCharArray();
		int ans = 0;
		int rain = 0;
		
		for(char c : s) {
			if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			}
		}
		
		System.out.println(ans);
		sc.close();
	}
	
}

 import java.util.Scanner; Scanner java.util public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		char[] s  = sc.nextLine().toCharArray();
		int ans = 0;
		int rain = 0;
		
		for(char c : s) {
			if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			}
		}
		
		System.out.println(ans);
		sc.close();
	}
	
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		char[] s  = sc.nextLine().toCharArray();
		int ans = 0;
		int rain = 0;
		
		for(char c : s) {
			if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			}
		}
		
		System.out.println(ans);
		sc.close();
	} main {
		
		Scanner sc = new Scanner(System.in);
		char[] s  = sc.nextLine().toCharArray();
		int ans = 0;
		int rain = 0;
		
		for(char c : s) {
			if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			}
		}
		
		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s  = sc.nextLine().toCharArray(); s sc.nextLine().toCharArray() sc.nextLine().toCharArray sc.nextLine() sc.nextLine sc int ans = 0; ans 0 int rain = 0; rain 0 for(char c : s) {
			if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			}
		} char c s {
			if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			}
		} {
			if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			}
		} if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			} c == 'R' c 'R' {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			} rain++ rain if(ans < rain) {
					ans = rain;
				} ans < rain ans rain {
					ans = rain;
				} ans = rain ans rain {
				rain = 0;
			} rain = 0 rain 0 System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		char[] s  = sc.nextLine().toCharArray();
		int ans = 0;
		int rain = 0;
		
		for(char c : s) {
			if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			}
		}
		
		System.out.println(ans);
		sc.close();
	}
	
} public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		char[] s  = sc.nextLine().toCharArray();
		int ans = 0;
		int rain = 0;
		
		for(char c : s) {
			if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			}
		}
		
		System.out.println(ans);
		sc.close();
	}
	
} Main
import java.util.Scanner;

 
public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		char[] s  = sc.nextLine().toCharArray();
		int ans = 0;
		int rain = 0;
		
		for(char c : s) {
			if(c == 'R') {
				rain++;
				if(ans < rain) {
					ans = rain;
				}
			}else {
				rain = 0;
			}
		}
		
		System.out.println(ans);
		sc.close();
	}
	
}


