import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		
		String s = fs.next();
		
		int maxSeq = 0;
		int nowSeq = 0;
		
		for(int i = 0; i < s.length(); i++) {
			
			if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			}
		}
		
		System.out.println(maxSeq);
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

		public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

		public void close() throws IOException {
			reader.close();
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		
		String s = fs.next();
		
		int maxSeq = 0;
		int nowSeq = 0;
		
		for(int i = 0; i < s.length(); i++) {
			
			if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			}
		}
		
		System.out.println(maxSeq);
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

		public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

		public void close() throws IOException {
			reader.close();
		}
	}

} Main public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	} main {
		Main mainObj = new Main();
		mainObj.solve();
	} Main mainObj = new Main(); mainObj new Main() mainObj.solve() mainObj.solve mainObj String[] args args public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		
		String s = fs.next();
		
		int maxSeq = 0;
		int nowSeq = 0;
		
		for(int i = 0; i < s.length(); i++) {
			
			if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			}
		}
		
		System.out.println(maxSeq);
	} solve {
		FastScanner fs = new FastScanner();
		
		String s = fs.next();
		
		int maxSeq = 0;
		int nowSeq = 0;
		
		for(int i = 0; i < s.length(); i++) {
			
			if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			}
		}
		
		System.out.println(maxSeq);
	} FastScanner fs = new FastScanner(); fs new FastScanner() String s = fs.next(); s fs.next() fs.next fs int maxSeq = 0; maxSeq 0 int nowSeq = 0; nowSeq 0 for(int i = 0; i < s.length(); i++) {
			
			if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			
			if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			}
		} {
			
			if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			}
		} if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			} s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			} nowSeq++ nowSeq maxSeq = Math.max(maxSeq, nowSeq) maxSeq Math.max(maxSeq, nowSeq) Math.max Math maxSeq nowSeq {
				nowSeq= 0;
			} nowSeq= 0 nowSeq 0 System.out.println(maxSeq) System.out.println System.out System System.out maxSeq public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

		public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

		public void close() throws IOException {
			reader.close();
		}
	} FastScanner BufferedReader reader; reader private StringTokenizer st; st public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		} FastScanner {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		} st = null st null reader = new BufferedReader(new InputStreamReader(System.in)) reader new BufferedReader(new InputStreamReader(System.in)) public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		} next {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		} if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			} st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
				st = new StringTokenizer(reader.readLine());
			} st = new StringTokenizer(reader.readLine()) st new StringTokenizer(reader.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		} nextLine {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		} st = null st null String readLine = null; readLine null readLine = reader.readLine() readLine reader.readLine() reader.readLine reader return readLine; readLine public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		} nextIntArr {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		} int[] retArr = new int[n]; retArr new int[n] n for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				retArr[i] = nextInt();
			} {
				retArr[i] = nextInt();
			} retArr[i] = nextInt() retArr[i] retArr i nextInt() nextInt return retArr; retArr int n n public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		} nextLongArr {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		} long[] retArr = new long[n]; retArr new long[n] n for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				retArr[i] = nextLong();
			} {
				retArr[i] = nextLong();
			} retArr[i] = nextLong() retArr[i] retArr i nextLong() nextLong return retArr; retArr int n n public void close() throws IOException {
			reader.close();
		} close {
			reader.close();
		} reader.close() reader.close reader public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		
		String s = fs.next();
		
		int maxSeq = 0;
		int nowSeq = 0;
		
		for(int i = 0; i < s.length(); i++) {
			
			if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			}
		}
		
		System.out.println(maxSeq);
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

		public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

		public void close() throws IOException {
			reader.close();
		}
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		
		String s = fs.next();
		
		int maxSeq = 0;
		int nowSeq = 0;
		
		for(int i = 0; i < s.length(); i++) {
			
			if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			}
		}
		
		System.out.println(maxSeq);
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

		public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

		public void close() throws IOException {
			reader.close();
		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		
		String s = fs.next();
		
		int maxSeq = 0;
		int nowSeq = 0;
		
		for(int i = 0; i < s.length(); i++) {
			
			if(s.charAt(i) == 'R') {
				nowSeq++;
				maxSeq = Math.max(maxSeq, nowSeq);
			}else {
				nowSeq= 0;
			}
		}
		
		System.out.println(maxSeq);
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

		public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

		public void close() throws IOException {
			reader.close();
		}
	}

}
