import java.util.*;

public class Main {

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

		String s = sc.next();
		char[] S = s.toCharArray();

		int c = 0;
		boolean rain = false;
		for (int i = 0; i<2; i++) {
			if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			}
		}
		for (int i = 0; i<3;i++) {
			if (S[i] == 'R') {
				rain = true;
			}
		}
		if (rain) {
			System.out.println(c+1);
		} else {
			System.out.println(0);
		}
	}
} import java.util.*; util.* java public class Main {

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

		String s = sc.next();
		char[] S = s.toCharArray();

		int c = 0;
		boolean rain = false;
		for (int i = 0; i<2; i++) {
			if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			}
		}
		for (int i = 0; i<3;i++) {
			if (S[i] == 'R') {
				rain = true;
			}
		}
		if (rain) {
			System.out.println(c+1);
		} else {
			System.out.println(0);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		char[] S = s.toCharArray();

		int c = 0;
		boolean rain = false;
		for (int i = 0; i<2; i++) {
			if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			}
		}
		for (int i = 0; i<3;i++) {
			if (S[i] == 'R') {
				rain = true;
			}
		}
		if (rain) {
			System.out.println(c+1);
		} else {
			System.out.println(0);
		}
	} main {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		char[] S = s.toCharArray();

		int c = 0;
		boolean rain = false;
		for (int i = 0; i<2; i++) {
			if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			}
		}
		for (int i = 0; i<3;i++) {
			if (S[i] == 'R') {
				rain = true;
			}
		}
		if (rain) {
			System.out.println(c+1);
		} else {
			System.out.println(0);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char[] S = s.toCharArray(); S s.toCharArray() s.toCharArray s int c = 0; c 0 boolean rain = false; rain false for (int i = 0; i<2; i++) {
			if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			}
		} int i = 0; int i = 0; i 0 i<2 i 2 i++ i++ i {
			if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			}
		} {
			if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			}
		} if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			} S[i] == S[i+1] && S[i] == 'R' S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 S[i] == 'R' S[i] S i 'R' {
				c++;

			} c++ c for (int i = 0; i<3;i++) {
			if (S[i] == 'R') {
				rain = true;
			}
		} int i = 0; int i = 0; i 0 i<3 i 3 i++ i++ i {
			if (S[i] == 'R') {
				rain = true;
			}
		} {
			if (S[i] == 'R') {
				rain = true;
			}
		} if (S[i] == 'R') {
				rain = true;
			} S[i] == 'R' S[i] S i 'R' {
				rain = true;
			} rain = true rain true if (rain) {
			System.out.println(c+1);
		} else {
			System.out.println(0);
		} rain {
			System.out.println(c+1);
		} System.out.println(c+1) System.out.println System.out System System.out c+1 c 1 {
			System.out.println(0);
		} System.out.println(0) System.out.println System.out System System.out 0 String[] args args public class Main {

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

		String s = sc.next();
		char[] S = s.toCharArray();

		int c = 0;
		boolean rain = false;
		for (int i = 0; i<2; i++) {
			if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			}
		}
		for (int i = 0; i<3;i++) {
			if (S[i] == 'R') {
				rain = true;
			}
		}
		if (rain) {
			System.out.println(c+1);
		} else {
			System.out.println(0);
		}
	}
} public class Main {

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

		String s = sc.next();
		char[] S = s.toCharArray();

		int c = 0;
		boolean rain = false;
		for (int i = 0; i<2; i++) {
			if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			}
		}
		for (int i = 0; i<3;i++) {
			if (S[i] == 'R') {
				rain = true;
			}
		}
		if (rain) {
			System.out.println(c+1);
		} else {
			System.out.println(0);
		}
	}
} Main
import java.util.*;

public class Main {

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

		String s = sc.next();
		char[] S = s.toCharArray();

		int c = 0;
		boolean rain = false;
		for (int i = 0; i<2; i++) {
			if (S[i] == S[i+1] && S[i] == 'R') {
				c++;

			}
		}
		for (int i = 0; i<3;i++) {
			if (S[i] == 'R') {
				rain = true;
			}
		}
		if (rain) {
			System.out.println(c+1);
		} else {
			System.out.println(0);
		}
	}
}