import java.util.*;
import java.io.*;

public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int ans = 0;
		for(int i = 0; i < 3; i++) {
			int local = 0;
			if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			}
			ans = Math.max(ans, local);
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int ans = 0;
		for(int i = 0; i < 3; i++) {
			int local = 0;
			if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			}
			ans = Math.max(ans, local);
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int ans = 0;
		for(int i = 0; i < 3; i++) {
			int local = 0;
			if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			}
			ans = Math.max(ans, local);
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int ans = 0;
		for(int i = 0; i < 3; i++) {
			int local = 0;
			if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			}
			ans = Math.max(ans, local);
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int ans = 0; ans 0 for(int i = 0; i < 3; i++) {
			int local = 0;
			if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			}
			ans = Math.max(ans, local);
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			int local = 0;
			if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			}
			ans = Math.max(ans, local);
		} {
			int local = 0;
			if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			}
			ans = Math.max(ans, local);
		} int local = 0; local 0 if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			} s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			} int j = i; j i local = 0 local 0 while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				} j < 3 && s.charAt(j) == 'R' j < 3 j 3 s.charAt(j) == 'R' s.charAt(j) s.charAt s j 'R' {
					j++;
					local++;
				} j++ j local++ local i = j i j ans = Math.max(ans, local) ans Math.max(ans, local) Math.max Math ans local System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int ans = 0;
		for(int i = 0; i < 3; i++) {
			int local = 0;
			if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			}
			ans = Math.max(ans, local);
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int ans = 0;
		for(int i = 0; i < 3; i++) {
			int local = 0;
			if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			}
			ans = Math.max(ans, local);
		}
		System.out.println(ans);
	}
} Main
import java.util.*;
import java.io.*;

public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		int ans = 0;
		for(int i = 0; i < 3; i++) {
			int local = 0;
			if(s.charAt(i) == 'R') {
				int j = i;
				local = 0;
				while(j < 3 && s.charAt(j) == 'R') {
					j++;
					local++;
				}
				i = j;
			}
			ans = Math.max(ans, local);
		}
		System.out.println(ans);
	}
}
