
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastInput in = new FastInput(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		ABC175A solver = new ABC175A();
		solver.solve(1, in, out);
		out.close();
	}

	static class ABC175A {

		public void solve(int testNum, FastInput in, PrintWriter out) {
			
			String s = in.next();
			
			int cnt = 0;
			int ans = 0;
			for(int i = 0 ; i < 3 ;i++) {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			}
			
			out.println(ans);

		}

	}
static class FastInput{
	private final BufferedReader in;
	private String[] buff;
	private int index = 0;
	
	public FastInput(InputStream im) {
		in = new BufferedReader(new InputStreamReader(im));
	}
	String nextLine() {
		try {
			return in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}
	String next() {
		while (buff == null || index >= buff.length) {
			buff = nextLine().split(" ");
			index = 0;
		}
		return buff[index++];
	}
	int nextInt() {
		return Integer.parseInt(next());
	}
	
	long nextLong() {
		return Long.parseLong(next());
	}
	
	Double nextDouble() {
		return Double.parseDouble(next());
	}
	
	BigInteger nextBigInteger() {
		return new BigInteger(next());
	}
	
	BigDecimal nextBigDecimal() {
		return new BigDecimal(next());
	}
	
	public int[] nextIntArray(final int n) {
		final int[] res = new int [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextInt();
		}
		return res;
	}
	
	public long[] nextLongArray(final int n) {
		final long[] res= new long [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextLong();
		}
		return res;
	}
	
	public double[] nextDoubleArray(final int n ) {
		final double[] res = new double [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextDouble();
		}
		return res;
	}
	
	
	public int[][] nextInt2DArray(final int n , final int m){
		int [][]res = new int [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		}
		return res;
	}
	public long[][] nextLong2DArray(final int n , final int m){
		long [][]res = new long [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		}
		return res;
	}
	
	public char[][] nextChar2DArray(final int n){
		char [][]res = new char [n][];
		
		for(int i = 0 ; i < n ;i++) {
			String s = next();
			res[i] = s.toCharArray();
		}
		
		return res;
	}
}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.math.BigDecimal; BigDecimal java.math import java.math.BigInteger; BigInteger java.math public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastInput in = new FastInput(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		ABC175A solver = new ABC175A();
		solver.solve(1, in, out);
		out.close();
	}

	static class ABC175A {

		public void solve(int testNum, FastInput in, PrintWriter out) {
			
			String s = in.next();
			
			int cnt = 0;
			int ans = 0;
			for(int i = 0 ; i < 3 ;i++) {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			}
			
			out.println(ans);

		}

	}
static class FastInput{
	private final BufferedReader in;
	private String[] buff;
	private int index = 0;
	
	public FastInput(InputStream im) {
		in = new BufferedReader(new InputStreamReader(im));
	}
	String nextLine() {
		try {
			return in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}
	String next() {
		while (buff == null || index >= buff.length) {
			buff = nextLine().split(" ");
			index = 0;
		}
		return buff[index++];
	}
	int nextInt() {
		return Integer.parseInt(next());
	}
	
	long nextLong() {
		return Long.parseLong(next());
	}
	
	Double nextDouble() {
		return Double.parseDouble(next());
	}
	
	BigInteger nextBigInteger() {
		return new BigInteger(next());
	}
	
	BigDecimal nextBigDecimal() {
		return new BigDecimal(next());
	}
	
	public int[] nextIntArray(final int n) {
		final int[] res = new int [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextInt();
		}
		return res;
	}
	
	public long[] nextLongArray(final int n) {
		final long[] res= new long [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextLong();
		}
		return res;
	}
	
	public double[] nextDoubleArray(final int n ) {
		final double[] res = new double [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextDouble();
		}
		return res;
	}
	
	
	public int[][] nextInt2DArray(final int n , final int m){
		int [][]res = new int [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		}
		return res;
	}
	public long[][] nextLong2DArray(final int n , final int m){
		long [][]res = new long [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		}
		return res;
	}
	
	public char[][] nextChar2DArray(final int n){
		char [][]res = new char [n][];
		
		for(int i = 0 ; i < n ;i++) {
			String s = next();
			res[i] = s.toCharArray();
		}
		
		return res;
	}
}
} Main public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastInput in = new FastInput(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		ABC175A solver = new ABC175A();
		solver.solve(1, in, out);
		out.close();
	} main {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastInput in = new FastInput(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		ABC175A solver = new ABC175A();
		solver.solve(1, in, out);
		out.close();
	} InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out FastInput in = new FastInput(inputStream); in new FastInput(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) ABC175A solver = new ABC175A(); solver new ABC175A() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class ABC175A {

		public void solve(int testNum, FastInput in, PrintWriter out) {
			
			String s = in.next();
			
			int cnt = 0;
			int ans = 0;
			for(int i = 0 ; i < 3 ;i++) {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			}
			
			out.println(ans);

		}

	} ABC175A public void solve(int testNum, FastInput in, PrintWriter out) {
			
			String s = in.next();
			
			int cnt = 0;
			int ans = 0;
			for(int i = 0 ; i < 3 ;i++) {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			}
			
			out.println(ans);

		} solve {
			
			String s = in.next();
			
			int cnt = 0;
			int ans = 0;
			for(int i = 0 ; i < 3 ;i++) {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			}
			
			out.println(ans);

		} String s = in.next(); s in.next() in.next in int cnt = 0; cnt 0 int ans = 0; ans 0 for(int i = 0 ; i < 3 ;i++) {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			} int i = 0 ; int i = 0 ; i 0 i < 3 i 3 i++ i++ i {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			} {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			} if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				} s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' {
					cnt++;
					ans = Math.max(ans,cnt);
				} cnt++ cnt ans = Math.max(ans,cnt) ans Math.max(ans,cnt) Math.max Math ans cnt {
					cnt = 0;
				} cnt = 0 cnt 0 out.println(ans) out.println out ans int testNum testNum FastInput in in PrintWriter out out static class FastInput{
	private final BufferedReader in;
	private String[] buff;
	private int index = 0;
	
	public FastInput(InputStream im) {
		in = new BufferedReader(new InputStreamReader(im));
	}
	String nextLine() {
		try {
			return in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}
	String next() {
		while (buff == null || index >= buff.length) {
			buff = nextLine().split(" ");
			index = 0;
		}
		return buff[index++];
	}
	int nextInt() {
		return Integer.parseInt(next());
	}
	
	long nextLong() {
		return Long.parseLong(next());
	}
	
	Double nextDouble() {
		return Double.parseDouble(next());
	}
	
	BigInteger nextBigInteger() {
		return new BigInteger(next());
	}
	
	BigDecimal nextBigDecimal() {
		return new BigDecimal(next());
	}
	
	public int[] nextIntArray(final int n) {
		final int[] res = new int [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextInt();
		}
		return res;
	}
	
	public long[] nextLongArray(final int n) {
		final long[] res= new long [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextLong();
		}
		return res;
	}
	
	public double[] nextDoubleArray(final int n ) {
		final double[] res = new double [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextDouble();
		}
		return res;
	}
	
	
	public int[][] nextInt2DArray(final int n , final int m){
		int [][]res = new int [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		}
		return res;
	}
	public long[][] nextLong2DArray(final int n , final int m){
		long [][]res = new long [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		}
		return res;
	}
	
	public char[][] nextChar2DArray(final int n){
		char [][]res = new char [n][];
		
		for(int i = 0 ; i < n ;i++) {
			String s = next();
			res[i] = s.toCharArray();
		}
		
		return res;
	}
} FastInput private final BufferedReader in; in private String[] buff; buff private int index = 0; index 0 public FastInput(InputStream im) {
		in = new BufferedReader(new InputStreamReader(im));
	} FastInput {
		in = new BufferedReader(new InputStreamReader(im));
	} in = new BufferedReader(new InputStreamReader(im)) in new BufferedReader(new InputStreamReader(im)) InputStream im im String nextLine() {
		try {
			return in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	} nextLine {
		try {
			return in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	} try {
			return in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			return in.readLine();
		} return in.readLine(); in.readLine() in.readLine in return null; null String next() {
		while (buff == null || index >= buff.length) {
			buff = nextLine().split(" ");
			index = 0;
		}
		return buff[index++];
	} next {
		while (buff == null || index >= buff.length) {
			buff = nextLine().split(" ");
			index = 0;
		}
		return buff[index++];
	} while (buff == null || index >= buff.length) {
			buff = nextLine().split(" ");
			index = 0;
		} buff == null || index >= buff.length buff == null buff null index >= buff.length index buff.length buff buff.length {
			buff = nextLine().split(" ");
			index = 0;
		} buff = nextLine().split(" ") buff nextLine().split(" ") nextLine().split nextLine() nextLine " " index = 0 index 0 return buff[index++]; buff[index++] buff index++ index 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 BigInteger nextBigInteger() {
		return new BigInteger(next());
	} nextBigInteger {
		return new BigInteger(next());
	} return new BigInteger(next()); new BigInteger(next()) BigDecimal nextBigDecimal() {
		return new BigDecimal(next());
	} nextBigDecimal {
		return new BigDecimal(next());
	} return new BigDecimal(next()); new BigDecimal(next()) public int[] nextIntArray(final int n) {
		final int[] res = new int [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextInt();
		}
		return res;
	} nextIntArray {
		final int[] res = new int [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextInt();
		}
		return res;
	} final int[] res = new int [n]; res new int [n] n for(int i = 0 ; i < n ;i++) {
			res[i] = nextInt();
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			res[i] = nextInt();
		} {
			res[i] = nextInt();
		} res[i] = nextInt() res[i] res i nextInt() nextInt return res; res final int n n public long[] nextLongArray(final int n) {
		final long[] res= new long [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextLong();
		}
		return res;
	} nextLongArray {
		final long[] res= new long [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextLong();
		}
		return res;
	} final long[] res= new long [n]; res new long [n] n for(int i = 0 ; i < n ;i++) {
			res[i] = nextLong();
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			res[i] = nextLong();
		} {
			res[i] = nextLong();
		} res[i] = nextLong() res[i] res i nextLong() nextLong return res; res final int n n public double[] nextDoubleArray(final int n ) {
		final double[] res = new double [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextDouble();
		}
		return res;
	} nextDoubleArray {
		final double[] res = new double [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextDouble();
		}
		return res;
	} final double[] res = new double [n]; res new double [n] n for(int i = 0 ; i < n ;i++) {
			res[i] = nextDouble();
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			res[i] = nextDouble();
		} {
			res[i] = nextDouble();
		} res[i] = nextDouble() res[i] res i nextDouble() nextDouble return res; res final int n n public int[][] nextInt2DArray(final int n , final int m){
		int [][]res = new int [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		}
		return res;
	} nextInt2DArray {
		int [][]res = new int [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		}
		return res;
	} int [][]res = new int [n][m]; res new int [n][m] n m for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		} {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		} for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			} int j = 0 ; int j = 0 ; j 0 j < m j m j++ j++ j {
				res[i][j] = nextInt();
			} {
				res[i][j] = nextInt();
			} res[i][j] = nextInt() res[i][j] res[i] res i j nextInt() nextInt return res; res final int n n final int m m public long[][] nextLong2DArray(final int n , final int m){
		long [][]res = new long [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		}
		return res;
	} nextLong2DArray {
		long [][]res = new long [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		}
		return res;
	} long [][]res = new long [n][m]; res new long [n][m] n m for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		} {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		} for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			} int j = 0 ; int j = 0 ; j 0 j < m j m j++ j++ j {
				res[i][j] = nextLong();
			} {
				res[i][j] = nextLong();
			} res[i][j] = nextLong() res[i][j] res[i] res i j nextLong() nextLong return res; res final int n n final int m m public char[][] nextChar2DArray(final int n){
		char [][]res = new char [n][];
		
		for(int i = 0 ; i < n ;i++) {
			String s = next();
			res[i] = s.toCharArray();
		}
		
		return res;
	} nextChar2DArray {
		char [][]res = new char [n][];
		
		for(int i = 0 ; i < n ;i++) {
			String s = next();
			res[i] = s.toCharArray();
		}
		
		return res;
	} char [][]res = new char [n][]; res new char [n][] n for(int i = 0 ; i < n ;i++) {
			String s = next();
			res[i] = s.toCharArray();
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			String s = next();
			res[i] = s.toCharArray();
		} {
			String s = next();
			res[i] = s.toCharArray();
		} String s = next(); s next() next res[i] = s.toCharArray() res[i] res i s.toCharArray() s.toCharArray s return res; res final int n n public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastInput in = new FastInput(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		ABC175A solver = new ABC175A();
		solver.solve(1, in, out);
		out.close();
	}

	static class ABC175A {

		public void solve(int testNum, FastInput in, PrintWriter out) {
			
			String s = in.next();
			
			int cnt = 0;
			int ans = 0;
			for(int i = 0 ; i < 3 ;i++) {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			}
			
			out.println(ans);

		}

	}
static class FastInput{
	private final BufferedReader in;
	private String[] buff;
	private int index = 0;
	
	public FastInput(InputStream im) {
		in = new BufferedReader(new InputStreamReader(im));
	}
	String nextLine() {
		try {
			return in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}
	String next() {
		while (buff == null || index >= buff.length) {
			buff = nextLine().split(" ");
			index = 0;
		}
		return buff[index++];
	}
	int nextInt() {
		return Integer.parseInt(next());
	}
	
	long nextLong() {
		return Long.parseLong(next());
	}
	
	Double nextDouble() {
		return Double.parseDouble(next());
	}
	
	BigInteger nextBigInteger() {
		return new BigInteger(next());
	}
	
	BigDecimal nextBigDecimal() {
		return new BigDecimal(next());
	}
	
	public int[] nextIntArray(final int n) {
		final int[] res = new int [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextInt();
		}
		return res;
	}
	
	public long[] nextLongArray(final int n) {
		final long[] res= new long [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextLong();
		}
		return res;
	}
	
	public double[] nextDoubleArray(final int n ) {
		final double[] res = new double [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextDouble();
		}
		return res;
	}
	
	
	public int[][] nextInt2DArray(final int n , final int m){
		int [][]res = new int [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		}
		return res;
	}
	public long[][] nextLong2DArray(final int n , final int m){
		long [][]res = new long [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		}
		return res;
	}
	
	public char[][] nextChar2DArray(final int n){
		char [][]res = new char [n][];
		
		for(int i = 0 ; i < n ;i++) {
			String s = next();
			res[i] = s.toCharArray();
		}
		
		return res;
	}
}
} public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastInput in = new FastInput(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		ABC175A solver = new ABC175A();
		solver.solve(1, in, out);
		out.close();
	}

	static class ABC175A {

		public void solve(int testNum, FastInput in, PrintWriter out) {
			
			String s = in.next();
			
			int cnt = 0;
			int ans = 0;
			for(int i = 0 ; i < 3 ;i++) {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			}
			
			out.println(ans);

		}

	}
static class FastInput{
	private final BufferedReader in;
	private String[] buff;
	private int index = 0;
	
	public FastInput(InputStream im) {
		in = new BufferedReader(new InputStreamReader(im));
	}
	String nextLine() {
		try {
			return in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}
	String next() {
		while (buff == null || index >= buff.length) {
			buff = nextLine().split(" ");
			index = 0;
		}
		return buff[index++];
	}
	int nextInt() {
		return Integer.parseInt(next());
	}
	
	long nextLong() {
		return Long.parseLong(next());
	}
	
	Double nextDouble() {
		return Double.parseDouble(next());
	}
	
	BigInteger nextBigInteger() {
		return new BigInteger(next());
	}
	
	BigDecimal nextBigDecimal() {
		return new BigDecimal(next());
	}
	
	public int[] nextIntArray(final int n) {
		final int[] res = new int [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextInt();
		}
		return res;
	}
	
	public long[] nextLongArray(final int n) {
		final long[] res= new long [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextLong();
		}
		return res;
	}
	
	public double[] nextDoubleArray(final int n ) {
		final double[] res = new double [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextDouble();
		}
		return res;
	}
	
	
	public int[][] nextInt2DArray(final int n , final int m){
		int [][]res = new int [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		}
		return res;
	}
	public long[][] nextLong2DArray(final int n , final int m){
		long [][]res = new long [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		}
		return res;
	}
	
	public char[][] nextChar2DArray(final int n){
		char [][]res = new char [n][];
		
		for(int i = 0 ; i < n ;i++) {
			String s = next();
			res[i] = s.toCharArray();
		}
		
		return res;
	}
}
} Main

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastInput in = new FastInput(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		ABC175A solver = new ABC175A();
		solver.solve(1, in, out);
		out.close();
	}

	static class ABC175A {

		public void solve(int testNum, FastInput in, PrintWriter out) {
			
			String s = in.next();
			
			int cnt = 0;
			int ans = 0;
			for(int i = 0 ; i < 3 ;i++) {
				if(s.charAt(i) == 'R') {
					cnt++;
					ans = Math.max(ans,cnt);
				}
				else {
					cnt = 0;
				}
			}
			
			out.println(ans);

		}

	}
static class FastInput{
	private final BufferedReader in;
	private String[] buff;
	private int index = 0;
	
	public FastInput(InputStream im) {
		in = new BufferedReader(new InputStreamReader(im));
	}
	String nextLine() {
		try {
			return in.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}
	String next() {
		while (buff == null || index >= buff.length) {
			buff = nextLine().split(" ");
			index = 0;
		}
		return buff[index++];
	}
	int nextInt() {
		return Integer.parseInt(next());
	}
	
	long nextLong() {
		return Long.parseLong(next());
	}
	
	Double nextDouble() {
		return Double.parseDouble(next());
	}
	
	BigInteger nextBigInteger() {
		return new BigInteger(next());
	}
	
	BigDecimal nextBigDecimal() {
		return new BigDecimal(next());
	}
	
	public int[] nextIntArray(final int n) {
		final int[] res = new int [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextInt();
		}
		return res;
	}
	
	public long[] nextLongArray(final int n) {
		final long[] res= new long [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextLong();
		}
		return res;
	}
	
	public double[] nextDoubleArray(final int n ) {
		final double[] res = new double [n];
		
		for(int i = 0 ; i < n ;i++) {
			res[i] = nextDouble();
		}
		return res;
	}
	
	
	public int[][] nextInt2DArray(final int n , final int m){
		int [][]res = new int [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextInt();
			}
		}
		return res;
	}
	public long[][] nextLong2DArray(final int n , final int m){
		long [][]res = new long [n][m];
		
		for(int i = 0 ; i < n ;i++) {
			for(int j = 0 ; j < m ;j++) {
				res[i][j] = nextLong();
			}
		}
		return res;
	}
	
	public char[][] nextChar2DArray(final int n){
		char [][]res = new char [n][];
		
		for(int i = 0 ; i < n ;i++) {
			String s = next();
			res[i] = s.toCharArray();
		}
		
		return res;
	}
}
}
