import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
			
			String s = sc.next();
			
			int len = s.length();
			int cnt = 0;
			int max = 0;
			char[] sChars = s.toCharArray();
			
			for(int i=0;i<len;i++) {
				if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				}
			}
			
			System.out.println(max);
	}	
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
			
			String s = sc.next();
			
			int len = s.length();
			int cnt = 0;
			int max = 0;
			char[] sChars = s.toCharArray();
			
			for(int i=0;i<len;i++) {
				if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				}
			}
			
			System.out.println(max);
	}	
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
			
			String s = sc.next();
			
			int len = s.length();
			int cnt = 0;
			int max = 0;
			char[] sChars = s.toCharArray();
			
			for(int i=0;i<len;i++) {
				if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				}
			}
			
			System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
			
			String s = sc.next();
			
			int len = s.length();
			int cnt = 0;
			int max = 0;
			char[] sChars = s.toCharArray();
			
			for(int i=0;i<len;i++) {
				if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				}
			}
			
			System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int len = s.length(); len s.length() s.length s int cnt = 0; cnt 0 int max = 0; max 0 char[] sChars = s.toCharArray(); sChars s.toCharArray() s.toCharArray s for(int i=0;i<len;i++) {
				if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				}
			} int i=0; int i=0; i 0 i<len i len i++ i++ i {
				if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				}
			} {
				if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				}
			} if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				} sChars[i]=='R' sChars[i] sChars i 'R' {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				} cnt=cnt+1 cnt cnt+1 cnt 1 if(max<cnt) {
						max=cnt;
					} max<cnt max cnt {
						max=cnt;
					} max=cnt max cnt {
					cnt=0;
				} cnt=0 cnt 0 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.next();
			
			int len = s.length();
			int cnt = 0;
			int max = 0;
			char[] sChars = s.toCharArray();
			
			for(int i=0;i<len;i++) {
				if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				}
			}
			
			System.out.println(max);
	}	
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
			
			String s = sc.next();
			
			int len = s.length();
			int cnt = 0;
			int max = 0;
			char[] sChars = s.toCharArray();
			
			for(int i=0;i<len;i++) {
				if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				}
			}
			
			System.out.println(max);
	}	
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
			
			String s = sc.next();
			
			int len = s.length();
			int cnt = 0;
			int max = 0;
			char[] sChars = s.toCharArray();
			
			for(int i=0;i<len;i++) {
				if(sChars[i]=='R') {
					cnt=cnt+1;
					if(max<cnt) {
						max=cnt;
					}
				}else {
					cnt=0;
				}
			}
			
			System.out.println(max);
	}	
}