

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

public class Main {
	static FastReader in = new FastReader();

	public static void main(String[] args) 
	{
		String s = in.nextLine();
		solve(s);
	}
	
	static void solve(String ss)
	{
		String [] s = ss.split("");
		int largest = -1;
		int curr = 0;
		for(int i = 0; i < s.length; i++)
		{
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		}
		largest = Math.max(largest, curr);
		System.out.println(largest);
	}
	
	

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
}


 import java.util.*; util.* java import java.io.*; io.* java public class Main {
	static FastReader in = new FastReader();

	public static void main(String[] args) 
	{
		String s = in.nextLine();
		solve(s);
	}
	
	static void solve(String ss)
	{
		String [] s = ss.split("");
		int largest = -1;
		int curr = 0;
		for(int i = 0; i < s.length; i++)
		{
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		}
		largest = Math.max(largest, curr);
		System.out.println(largest);
	}
	
	

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
} Main static FastReader in = new FastReader(); in new FastReader() public static void main(String[] args) 
	{
		String s = in.nextLine();
		solve(s);
	} main {
		String s = in.nextLine();
		solve(s);
	} String s = in.nextLine(); s in.nextLine() in.nextLine in solve(s) solve s String[] args args static void solve(String ss)
	{
		String [] s = ss.split("");
		int largest = -1;
		int curr = 0;
		for(int i = 0; i < s.length; i++)
		{
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		}
		largest = Math.max(largest, curr);
		System.out.println(largest);
	} solve {
		String [] s = ss.split("");
		int largest = -1;
		int curr = 0;
		for(int i = 0; i < s.length; i++)
		{
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		}
		largest = Math.max(largest, curr);
		System.out.println(largest);
	} String [] s = ss.split(""); s ss.split("") ss.split ss "" int largest = -1; largest -1 1 int curr = 0; curr 0 for(int i = 0; i < s.length; i++)
		{
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		} int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		} {
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		} if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			} s[i].equals("R") s[i].equals s[i] s i "R" curr++ curr {
				largest = Math.max(largest, curr);
				curr = 0;
			} largest = Math.max(largest, curr) largest Math.max(largest, curr) Math.max Math largest curr curr = 0 curr 0 largest = Math.max(largest, curr) largest Math.max(largest, curr) Math.max Math largest curr System.out.println(largest) System.out.println System.out System System.out largest String ss ss static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	} FastReader BufferedReader br; br StringTokenizer st; st public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		} FastReader {
			br = new BufferedReader(new InputStreamReader(System.in));
		} br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		} next {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		} while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			} st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			} try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				} catch (IOException e) {
					e.printStackTrace();
				} IOException e {
					e.printStackTrace();
				} e.printStackTrace() e.printStackTrace e {
					st = new StringTokenizer(br.readLine());
				} st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
			return Double.parseDouble(next());
		} nextDouble {
			return Double.parseDouble(next());
		} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		} nextLine {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		} String str = ""; str "" try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			} IOException e {
				e.printStackTrace();
			} e.printStackTrace() e.printStackTrace e {
				str = br.readLine();
			} str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {
	static FastReader in = new FastReader();

	public static void main(String[] args) 
	{
		String s = in.nextLine();
		solve(s);
	}
	
	static void solve(String ss)
	{
		String [] s = ss.split("");
		int largest = -1;
		int curr = 0;
		for(int i = 0; i < s.length; i++)
		{
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		}
		largest = Math.max(largest, curr);
		System.out.println(largest);
	}
	
	

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
} public class Main {
	static FastReader in = new FastReader();

	public static void main(String[] args) 
	{
		String s = in.nextLine();
		solve(s);
	}
	
	static void solve(String ss)
	{
		String [] s = ss.split("");
		int largest = -1;
		int curr = 0;
		for(int i = 0; i < s.length; i++)
		{
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		}
		largest = Math.max(largest, curr);
		System.out.println(largest);
	}
	
	

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
} Main


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

public class Main {
	static FastReader in = new FastReader();

	public static void main(String[] args) 
	{
		String s = in.nextLine();
		solve(s);
	}
	
	static void solve(String ss)
	{
		String [] s = ss.split("");
		int largest = -1;
		int curr = 0;
		for(int i = 0; i < s.length; i++)
		{
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		}
		largest = Math.max(largest, curr);
		System.out.println(largest);
	}
	
	

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
}



