import java.util.*;

public class Main {
	public static void main(String[] args) {
		
		Scanner ob = new Scanner(System.in);
		String patt = ob.next();
		int result = 0;
		
		for(int i = 0; i < patt.length(); i++) {
			int temp = 0;
			for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			}
			result = Math.max(result, temp);
		}
		System.out.println(result);
		ob.close();
	}

} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		
		Scanner ob = new Scanner(System.in);
		String patt = ob.next();
		int result = 0;
		
		for(int i = 0; i < patt.length(); i++) {
			int temp = 0;
			for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			}
			result = Math.max(result, temp);
		}
		System.out.println(result);
		ob.close();
	}

} Main public static void main(String[] args) {
		
		Scanner ob = new Scanner(System.in);
		String patt = ob.next();
		int result = 0;
		
		for(int i = 0; i < patt.length(); i++) {
			int temp = 0;
			for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			}
			result = Math.max(result, temp);
		}
		System.out.println(result);
		ob.close();
	} main {
		
		Scanner ob = new Scanner(System.in);
		String patt = ob.next();
		int result = 0;
		
		for(int i = 0; i < patt.length(); i++) {
			int temp = 0;
			for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			}
			result = Math.max(result, temp);
		}
		System.out.println(result);
		ob.close();
	} Scanner ob = new Scanner(System.in); ob new Scanner(System.in) String patt = ob.next(); patt ob.next() ob.next ob int result = 0; result 0 for(int i = 0; i < patt.length(); i++) {
			int temp = 0;
			for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			}
			result = Math.max(result, temp);
		} int i = 0; int i = 0; i 0 i < patt.length() i patt.length() patt.length patt i++ i++ i {
			int temp = 0;
			for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			}
			result = Math.max(result, temp);
		} {
			int temp = 0;
			for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			}
			result = Math.max(result, temp);
		} int temp = 0; temp 0 for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			} int j = i; int j = i; j i j < patt.length() j patt.length() patt.length patt j++ j++ j {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			} {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			} if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				} patt.charAt(j) == 'R' patt.charAt(j) patt.charAt patt j 'R' {
					temp++;
				} temp++ temp {
					break;
				} break; result = Math.max(result, temp) result Math.max(result, temp) Math.max Math result temp System.out.println(result) System.out.println System.out System System.out result ob.close() ob.close ob String[] args args public class Main {
	public static void main(String[] args) {
		
		Scanner ob = new Scanner(System.in);
		String patt = ob.next();
		int result = 0;
		
		for(int i = 0; i < patt.length(); i++) {
			int temp = 0;
			for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			}
			result = Math.max(result, temp);
		}
		System.out.println(result);
		ob.close();
	}

} public class Main {
	public static void main(String[] args) {
		
		Scanner ob = new Scanner(System.in);
		String patt = ob.next();
		int result = 0;
		
		for(int i = 0; i < patt.length(); i++) {
			int temp = 0;
			for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			}
			result = Math.max(result, temp);
		}
		System.out.println(result);
		ob.close();
	}

} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		
		Scanner ob = new Scanner(System.in);
		String patt = ob.next();
		int result = 0;
		
		for(int i = 0; i < patt.length(); i++) {
			int temp = 0;
			for(int j = i; j < patt.length(); j++) {
				if(patt.charAt(j) == 'R'){
					temp++;
				}else {
					break;
				}
			}
			result = Math.max(result, temp);
		}
		System.out.println(result);
		ob.close();
	}

}
