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

class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		char[] s = f.readLine().toCharArray();
		
		int ans = 0;
		
		for (int i = 0; i < 3; i++) {
			if (s[i] == 'R') {
				int j = i;
				while (j < 2 && s[j+1] == 'R') {
					j++;
				}
				ans = Math.max(ans, j - i + 1);
			}
		}
		
		out.println(ans);
		
		f.close();
		out.close();
	}
	
	static boolean[] generate(int x, int n) {
		boolean[] s = new boolean[n];
		for (int i = 0; i < n; i++) {
			s[i] = (x & (1 << i)) >> i == 1;
		}
		return s;
	}
	
	static boolean valid(int K, char[][] A, boolean[] h, boolean[] v) {
		for (int i = 0; i < h.length; i++) {
			for (int j = 0; j < v.length; j++) {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			}
		}
		
		return K == 0;
	}

	static BufferedReader f;
	static PrintWriter out;
	static StringTokenizer st;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIn(String s) throws IOException {
		f = new BufferedReader(new FileReader(s));
	}

	static void setOut(String s) throws IOException {
		out = new PrintWriter(new FileWriter(s));
	}

	static void setIn() {
		f = new BufferedReader(new InputStreamReader(System.in));
	}

	static void setOut() {
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}

	static void setIO(String s) throws IOException {
		setIn(s + ".in");
		setOut(s + ".out");
	}

	static void setIO() {
		setIn();
		setOut();
	}
} import java.util.*; util.* java import java.io.*; io.* java class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		char[] s = f.readLine().toCharArray();
		
		int ans = 0;
		
		for (int i = 0; i < 3; i++) {
			if (s[i] == 'R') {
				int j = i;
				while (j < 2 && s[j+1] == 'R') {
					j++;
				}
				ans = Math.max(ans, j - i + 1);
			}
		}
		
		out.println(ans);
		
		f.close();
		out.close();
	}
	
	static boolean[] generate(int x, int n) {
		boolean[] s = new boolean[n];
		for (int i = 0; i < n; i++) {
			s[i] = (x & (1 << i)) >> i == 1;
		}
		return s;
	}
	
	static boolean valid(int K, char[][] A, boolean[] h, boolean[] v) {
		for (int i = 0; i < h.length; i++) {
			for (int j = 0; j < v.length; j++) {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			}
		}
		
		return K == 0;
	}

	static BufferedReader f;
	static PrintWriter out;
	static StringTokenizer st;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIn(String s) throws IOException {
		f = new BufferedReader(new FileReader(s));
	}

	static void setOut(String s) throws IOException {
		out = new PrintWriter(new FileWriter(s));
	}

	static void setIn() {
		f = new BufferedReader(new InputStreamReader(System.in));
	}

	static void setOut() {
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}

	static void setIO(String s) throws IOException {
		setIn(s + ".in");
		setOut(s + ".out");
	}

	static void setIO() {
		setIn();
		setOut();
	}
} Main static BufferedReader f; f static PrintWriter out; out static StringTokenizer st; st public static void main(String[] args) throws IOException {
		setIO();

		char[] s = f.readLine().toCharArray();
		
		int ans = 0;
		
		for (int i = 0; i < 3; i++) {
			if (s[i] == 'R') {
				int j = i;
				while (j < 2 && s[j+1] == 'R') {
					j++;
				}
				ans = Math.max(ans, j - i + 1);
			}
		}
		
		out.println(ans);
		
		f.close();
		out.close();
	} main {
		setIO();

		char[] s = f.readLine().toCharArray();
		
		int ans = 0;
		
		for (int i = 0; i < 3; i++) {
			if (s[i] == 'R') {
				int j = i;
				while (j < 2 && s[j+1] == 'R') {
					j++;
				}
				ans = Math.max(ans, j - i + 1);
			}
		}
		
		out.println(ans);
		
		f.close();
		out.close();
	} setIO() setIO char[] s = f.readLine().toCharArray(); s f.readLine().toCharArray() f.readLine().toCharArray f.readLine() f.readLine f int ans = 0; ans 0 for (int i = 0; i < 3; i++) {
			if (s[i] == 'R') {
				int j = i;
				while (j < 2 && s[j+1] == 'R') {
					j++;
				}
				ans = Math.max(ans, j - i + 1);
			}
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			if (s[i] == 'R') {
				int j = i;
				while (j < 2 && s[j+1] == 'R') {
					j++;
				}
				ans = Math.max(ans, j - i + 1);
			}
		} {
			if (s[i] == 'R') {
				int j = i;
				while (j < 2 && s[j+1] == 'R') {
					j++;
				}
				ans = Math.max(ans, j - i + 1);
			}
		} if (s[i] == 'R') {
				int j = i;
				while (j < 2 && s[j+1] == 'R') {
					j++;
				}
				ans = Math.max(ans, j - i + 1);
			} s[i] == 'R' s[i] s i 'R' {
				int j = i;
				while (j < 2 && s[j+1] == 'R') {
					j++;
				}
				ans = Math.max(ans, j - i + 1);
			} int j = i; j i while (j < 2 && s[j+1] == 'R') {
					j++;
				} j < 2 && s[j+1] == 'R' j < 2 j 2 s[j+1] == 'R' s[j+1] s j+1 j 1 'R' {
					j++;
				} j++ j ans = Math.max(ans, j - i + 1) ans Math.max(ans, j - i + 1) Math.max Math ans j - i + 1 j - i j i 1 out.println(ans) out.println out ans f.close() f.close f out.close() out.close out String[] args args static boolean[] generate(int x, int n) {
		boolean[] s = new boolean[n];
		for (int i = 0; i < n; i++) {
			s[i] = (x & (1 << i)) >> i == 1;
		}
		return s;
	} generate {
		boolean[] s = new boolean[n];
		for (int i = 0; i < n; i++) {
			s[i] = (x & (1 << i)) >> i == 1;
		}
		return s;
	} boolean[] s = new boolean[n]; s new boolean[n] n for (int i = 0; i < n; i++) {
			s[i] = (x & (1 << i)) >> i == 1;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			s[i] = (x & (1 << i)) >> i == 1;
		} {
			s[i] = (x & (1 << i)) >> i == 1;
		} s[i] = (x & (1 << i)) >> i == 1 s[i] s i (x & (1 << i)) >> i == 1 (x & (1 << i)) >> i (x & (1 << i)) x (1 << i) 1 i i 1 return s; s int x x int n n static boolean valid(int K, char[][] A, boolean[] h, boolean[] v) {
		for (int i = 0; i < h.length; i++) {
			for (int j = 0; j < v.length; j++) {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			}
		}
		
		return K == 0;
	} valid {
		for (int i = 0; i < h.length; i++) {
			for (int j = 0; j < v.length; j++) {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			}
		}
		
		return K == 0;
	} for (int i = 0; i < h.length; i++) {
			for (int j = 0; j < v.length; j++) {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			}
		} int i = 0; int i = 0; i 0 i < h.length i h.length h h.length i++ i++ i {
			for (int j = 0; j < v.length; j++) {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			}
		} {
			for (int j = 0; j < v.length; j++) {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			}
		} for (int j = 0; j < v.length; j++) {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			} int j = 0; int j = 0; j 0 j < v.length j v.length v v.length j++ j++ j {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			} {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			} if (h[i] && v[i] && A[i][j] == '#') K--; h[i] && v[i] && A[i][j] == '#' h[i] && v[i] && A[i][j] == '#' h[i] h i v[i] v i A[i][j] == '#' A[i][j] A[i] A i j '#' K-- K return K == 0; K == 0 K 0 int K K char[][] A A boolean[] h h boolean[] v v static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	} ni {
		return Integer.parseInt(st.nextToken());
	} return Integer.parseInt(st.nextToken()); Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st StringTokenizer st st static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	} ni {
		return Integer.parseInt(f.readLine());
	} return Integer.parseInt(f.readLine()); Integer.parseInt(f.readLine()) Integer.parseInt Integer f.readLine() f.readLine f static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	} nl {
		return new StringTokenizer(f.readLine());
	} return new StringTokenizer(f.readLine()); new StringTokenizer(f.readLine()) static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	} nia {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	} StringTokenizer st = nl(); st nl() nl int[] A = new int[N]; A new int[N] N for (int i = 0; i < N; i++)
			A[i] = ni(st); int i = 0; int i = 0; i 0 i < N i N i++ i++ i A[i] = ni(st); A[i] = ni(st) A[i] A i ni(st) ni st return A; A int N N static void setIn(String s) throws IOException {
		f = new BufferedReader(new FileReader(s));
	} setIn {
		f = new BufferedReader(new FileReader(s));
	} f = new BufferedReader(new FileReader(s)) f new BufferedReader(new FileReader(s)) String s s static void setOut(String s) throws IOException {
		out = new PrintWriter(new FileWriter(s));
	} setOut {
		out = new PrintWriter(new FileWriter(s));
	} out = new PrintWriter(new FileWriter(s)) out new PrintWriter(new FileWriter(s)) String s s static void setIn() {
		f = new BufferedReader(new InputStreamReader(System.in));
	} setIn {
		f = new BufferedReader(new InputStreamReader(System.in));
	} f = new BufferedReader(new InputStreamReader(System.in)) f new BufferedReader(new InputStreamReader(System.in)) static void setOut() {
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	} setOut {
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	} out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) out new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) static void setIO(String s) throws IOException {
		setIn(s + ".in");
		setOut(s + ".out");
	} setIO {
		setIn(s + ".in");
		setOut(s + ".out");
	} setIn(s + ".in") setIn s + ".in" s ".in" setOut(s + ".out") setOut s + ".out" s ".out" String s s static void setIO() {
		setIn();
		setOut();
	} setIO {
		setIn();
		setOut();
	} setIn() setIn setOut() setOut
import java.util.*;
import java.io.*;

class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		char[] s = f.readLine().toCharArray();
		
		int ans = 0;
		
		for (int i = 0; i < 3; i++) {
			if (s[i] == 'R') {
				int j = i;
				while (j < 2 && s[j+1] == 'R') {
					j++;
				}
				ans = Math.max(ans, j - i + 1);
			}
		}
		
		out.println(ans);
		
		f.close();
		out.close();
	}
	
	static boolean[] generate(int x, int n) {
		boolean[] s = new boolean[n];
		for (int i = 0; i < n; i++) {
			s[i] = (x & (1 << i)) >> i == 1;
		}
		return s;
	}
	
	static boolean valid(int K, char[][] A, boolean[] h, boolean[] v) {
		for (int i = 0; i < h.length; i++) {
			for (int j = 0; j < v.length; j++) {
				if (h[i] && v[i] && A[i][j] == '#') K--;
			}
		}
		
		return K == 0;
	}

	static BufferedReader f;
	static PrintWriter out;
	static StringTokenizer st;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIn(String s) throws IOException {
		f = new BufferedReader(new FileReader(s));
	}

	static void setOut(String s) throws IOException {
		out = new PrintWriter(new FileWriter(s));
	}

	static void setIn() {
		f = new BufferedReader(new InputStreamReader(System.in));
	}

	static void setOut() {
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}

	static void setIO(String s) throws IOException {
		setIn(s + ".in");
		setOut(s + ".out");
	}

	static void setIO() {
		setIn();
		setOut();
	}
}
