import java.io.IOException;

public class Main {

	public static void main(String[] args) throws IOException {
		int count = 0;
		int res = 0;
		for (int i = 0; i < 3; i++) {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		}
		System.out.println(res);
	}

} import java.io.IOException; IOException java.io public class Main {

	public static void main(String[] args) throws IOException {
		int count = 0;
		int res = 0;
		for (int i = 0; i < 3; i++) {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		}
		System.out.println(res);
	}

} Main public static void main(String[] args) throws IOException {
		int count = 0;
		int res = 0;
		for (int i = 0; i < 3; i++) {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		}
		System.out.println(res);
	} main {
		int count = 0;
		int res = 0;
		for (int i = 0; i < 3; i++) {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		}
		System.out.println(res);
	} int count = 0; count 0 int res = 0; res 0 for (int i = 0; i < 3; i++) {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		} {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		} char data = (char) System.in.read(); data (char) System.in.read() System.in.read System.in System System.in if (data == 'R') {
				count++;
			} data == 'R' data 'R' {
				count++;
			} count++ count if (data == 'S') {
				count = 0;
			} data == 'S' data 'S' {
				count = 0;
			} count = 0 count 0 if (count > res) {
				res = count;
			} count > res count res {
				res = count;
			} res = count res count System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		int count = 0;
		int res = 0;
		for (int i = 0; i < 3; i++) {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		}
		System.out.println(res);
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		int count = 0;
		int res = 0;
		for (int i = 0; i < 3; i++) {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		}
		System.out.println(res);
	}

} Main
import java.io.IOException;

public class Main {

	public static void main(String[] args) throws IOException {
		int count = 0;
		int res = 0;
		for (int i = 0; i < 3; i++) {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		}
		System.out.println(res);
	}

}
