import java.util.*;
public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		char arr[] = S.toCharArray();
		int r = 0;//2
		int max = 0;
		for (int i = 0; i < arr.length; i++) {
			if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			}
		}
		if (max<r) {
			System.out.println(r);
		}else {
		System.out.println(max);
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		char arr[] = S.toCharArray();
		int r = 0;//2
		int max = 0;
		for (int i = 0; i < arr.length; i++) {
			if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			}
		}
		if (max<r) {
			System.out.println(r);
		}else {
		System.out.println(max);
		}
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		char arr[] = S.toCharArray();
		int r = 0;//2
		int max = 0;
		for (int i = 0; i < arr.length; i++) {
			if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			}
		}
		if (max<r) {
			System.out.println(r);
		}else {
		System.out.println(max);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		char arr[] = S.toCharArray();
		int r = 0;//2
		int max = 0;
		for (int i = 0; i < arr.length; i++) {
			if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			}
		}
		if (max<r) {
			System.out.println(r);
		}else {
		System.out.println(max);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc char arr[] = S.toCharArray(); arr S.toCharArray() S.toCharArray S int r = 0; r 0 int max = 0; max 0 for (int i = 0; i < arr.length; i++) {
			if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			}
		} int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i {
			if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			}
		} {
			if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			}
		} if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			} arr[i]=='R' arr[i] arr i 'R' {
				r++;
			} r++ r {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			} if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				} max<r max r {
					max = r;
					r = 0;
				} max = r max r r = 0 r 0 {
					r = 0;
				} r = 0 r 0 if (max<r) {
			System.out.println(r);
		}else {
		System.out.println(max);
		} max<r max r {
			System.out.println(r);
		} System.out.println(r) System.out.println System.out System System.out r {
		System.out.println(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[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		char arr[] = S.toCharArray();
		int r = 0;//2
		int max = 0;
		for (int i = 0; i < arr.length; i++) {
			if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			}
		}
		if (max<r) {
			System.out.println(r);
		}else {
		System.out.println(max);
		}
	}
} public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		char arr[] = S.toCharArray();
		int r = 0;//2
		int max = 0;
		for (int i = 0; i < arr.length; i++) {
			if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			}
		}
		if (max<r) {
			System.out.println(r);
		}else {
		System.out.println(max);
		}
	}
} Main
import java.util.*;
public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		char arr[] = S.toCharArray();
		int r = 0;//2
		int max = 0;
		for (int i = 0; i < arr.length; i++) {
			if(arr[i]=='R') {
				r++;
			}else {
				if (max<r) {
					max = r;
					r = 0;
				}else {
					r = 0;
				}
			}
		}
		if (max<r) {
			System.out.println(r);
		}else {
		System.out.println(max);
		}
	}
}