import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		String k = s.next();
		int max = 0;
		for(int i=0;i<k.length();i++) {
			int ctr = 0;
			while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			}
			max = Math.max(max,ctr);
			
		}
		System.out.println(max);
		
		
	}
} import java.util.*; util.* java public class Main {
	
	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		String k = s.next();
		int max = 0;
		for(int i=0;i<k.length();i++) {
			int ctr = 0;
			while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			}
			max = Math.max(max,ctr);
			
		}
		System.out.println(max);
		
		
	}
} Main public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		String k = s.next();
		int max = 0;
		for(int i=0;i<k.length();i++) {
			int ctr = 0;
			while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			}
			max = Math.max(max,ctr);
			
		}
		System.out.println(max);
		
		
	} main {
		
		Scanner s = new Scanner(System.in);
		String k = s.next();
		int max = 0;
		for(int i=0;i<k.length();i++) {
			int ctr = 0;
			while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			}
			max = Math.max(max,ctr);
			
		}
		System.out.println(max);
		
		
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) String k = s.next(); k s.next() s.next s int max = 0; max 0 for(int i=0;i<k.length();i++) {
			int ctr = 0;
			while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			}
			max = Math.max(max,ctr);
			
		} int i=0; int i=0; i 0 i<k.length() i k.length() k.length k i++ i++ i {
			int ctr = 0;
			while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			}
			max = Math.max(max,ctr);
			
		} {
			int ctr = 0;
			while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			}
			max = Math.max(max,ctr);
			
		} int ctr = 0; ctr 0 while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			} i<k.length() && k.charAt(i)=='R' i<k.length() i k.length() k.length k k.charAt(i)=='R' k.charAt(i) k.charAt k i 'R' {
				i++;
				ctr++;
			} i++ i ctr++ ctr max = Math.max(max,ctr) max Math.max(max,ctr) Math.max Math max ctr 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) {
		
		Scanner s = new Scanner(System.in);
		String k = s.next();
		int max = 0;
		for(int i=0;i<k.length();i++) {
			int ctr = 0;
			while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			}
			max = Math.max(max,ctr);
			
		}
		System.out.println(max);
		
		
	}
} public class Main {
	
	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		String k = s.next();
		int max = 0;
		for(int i=0;i<k.length();i++) {
			int ctr = 0;
			while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			}
			max = Math.max(max,ctr);
			
		}
		System.out.println(max);
		
		
	}
} Main
import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		String k = s.next();
		int max = 0;
		for(int i=0;i<k.length();i++) {
			int ctr = 0;
			while(i<k.length() && k.charAt(i)=='R') {
				i++;
				ctr++;
			}
			max = Math.max(max,ctr);
			
		}
		System.out.println(max);
		
		
	}
}
