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

public class Main {

	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);

		String str = sc.next();

		int rain = 0;
		int count = 0;
		for (int i = 0; i < 3; i++) {
			if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			}
		}
		if (count > rain) {
			rain = count;
		}
		System.out.println(rain);
	}

	private static class FastScanner {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;

		public FastScanner(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
			tokenizer = null;
		}

		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

	}
} 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.util.StringTokenizer; StringTokenizer java.util public class Main {

	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);

		String str = sc.next();

		int rain = 0;
		int count = 0;
		for (int i = 0; i < 3; i++) {
			if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			}
		}
		if (count > rain) {
			rain = count;
		}
		System.out.println(rain);
	}

	private static class FastScanner {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;

		public FastScanner(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
			tokenizer = null;
		}

		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

	}
} Main public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);

		String str = sc.next();

		int rain = 0;
		int count = 0;
		for (int i = 0; i < 3; i++) {
			if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			}
		}
		if (count > rain) {
			rain = count;
		}
		System.out.println(rain);
	} main {
		FastScanner sc = new FastScanner(System.in);

		String str = sc.next();

		int rain = 0;
		int count = 0;
		for (int i = 0; i < 3; i++) {
			if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			}
		}
		if (count > rain) {
			rain = count;
		}
		System.out.println(rain);
	} FastScanner sc = new FastScanner(System.in); sc new FastScanner(System.in) String str = sc.next(); str sc.next() sc.next sc int rain = 0; rain 0 int count = 0; count 0 for (int i = 0; i < 3; i++) {
			if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			}
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			}
		} {
			if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			}
		} if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			} str.charAt(i)=='R' str.charAt(i) str.charAt str i 'R' {
				count++;
			} count++ count {
				if (count > rain) {
					rain = count;
				}
				count=0;
			} if (count > rain) {
					rain = count;
				} count > rain count rain {
					rain = count;
				} rain = count rain count count=0 count 0 if (count > rain) {
			rain = count;
		} count > rain count rain {
			rain = count;
		} rain = count rain count System.out.println(rain) System.out.println System.out System System.out rain String[] args args private static class FastScanner {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;

		public FastScanner(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
			tokenizer = null;
		}

		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

	} FastScanner private BufferedReader reader = null; reader null private StringTokenizer tokenizer = null; tokenizer null public FastScanner(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
			tokenizer = null;
		} FastScanner {
			reader = new BufferedReader(new InputStreamReader(in));
			tokenizer = null;
		} reader = new BufferedReader(new InputStreamReader(in)) reader new BufferedReader(new InputStreamReader(in)) tokenizer = null tokenizer null InputStream in in public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		} next {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		} if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			} tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			} try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				} catch (IOException e) {
					throw new RuntimeException(e);
				} IOException e {
					throw new RuntimeException(e);
				} throw new RuntimeException(e); new RuntimeException(e) {
					tokenizer = new StringTokenizer(reader.readLine());
				} tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public class Main {

	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);

		String str = sc.next();

		int rain = 0;
		int count = 0;
		for (int i = 0; i < 3; i++) {
			if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			}
		}
		if (count > rain) {
			rain = count;
		}
		System.out.println(rain);
	}

	private static class FastScanner {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;

		public FastScanner(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
			tokenizer = null;
		}

		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

	}
} public class Main {

	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);

		String str = sc.next();

		int rain = 0;
		int count = 0;
		for (int i = 0; i < 3; i++) {
			if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			}
		}
		if (count > rain) {
			rain = count;
		}
		System.out.println(rain);
	}

	private static class FastScanner {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;

		public FastScanner(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
			tokenizer = null;
		}

		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

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

public class Main {

	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);

		String str = sc.next();

		int rain = 0;
		int count = 0;
		for (int i = 0; i < 3; i++) {
			if (str.charAt(i)=='R') {
				count++;
			}
			else {
				if (count > rain) {
					rain = count;
				}
				count=0;
			}
		}
		if (count > rain) {
			rain = count;
		}
		System.out.println(rain);
	}

	private static class FastScanner {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;

		public FastScanner(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
			tokenizer = null;
		}

		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

	}
}
