import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Vector;
import java.util.concurrent.CountDownLatch;

public class Main {
	
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		String string = in.next();
		char arr[] = string.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.Arrays; Arrays java.util import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Vector; Vector java.util import java.util.concurrent.CountDownLatch; CountDownLatch java.util.concurrent public class Main {
	
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		String string = in.next();
		char arr[] = string.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 in = new Scanner(System.in);
		String string = in.next();
		char arr[] = string.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 in = new Scanner(System.in);
		String string = in.next();
		char arr[] = string.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 in = new Scanner(System.in); in new Scanner(System.in) String string = in.next(); string in.next() in.next in char arr[] = string.toCharArray(); arr string.toCharArray() string.toCharArray string 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 in = new Scanner(System.in);
		String string = in.next();
		char arr[] = string.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 in = new Scanner(System.in);
		String string = in.next();
		char arr[] = string.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.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Vector;
import java.util.concurrent.CountDownLatch;

public class Main {
	
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		String string = in.next();
		char arr[] = string.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);
		}
	}

}