import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;
		if(s.contains("R")){
			 if(s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2)){
					count = 3;
				}
			else if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			}
		}
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;
		if(s.contains("R")){
			 if(s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2)){
					count = 3;
				}
			else if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			}
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;
		if(s.contains("R")){
			 if(s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2)){
					count = 3;
				}
			else if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;
		if(s.contains("R")){
			 if(s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2)){
					count = 3;
				}
			else if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			}
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int count = 0; count 0 if(s.contains("R")){
			 if(s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2)){
					count = 3;
				}
			else if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			}
		} s.contains("R") s.contains s "R" {
			 if(s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2)){
					count = 3;
				}
			else if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			}
		} if(s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2)){
					count = 3;
				}
			else if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			} s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2) s.charAt(0)==s.charAt(1) s.charAt(0) s.charAt s 0 s.charAt(1) s.charAt s 1 s.charAt(0)==s.charAt(2) s.charAt(0) s.charAt s 0 s.charAt(2) s.charAt s 2 {
					count = 3;
				} count = 3 count 3 if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			} s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R' s.charAt(0)=='R'&&s.charAt(1)=='R' s.charAt(0)=='R' s.charAt(0) s.charAt s 0 'R' s.charAt(1)=='R' s.charAt(1) s.charAt s 1 'R' s.charAt(1)=='R'&&s.charAt(2)=='R' s.charAt(1)=='R' s.charAt(1) s.charAt s 1 'R' s.charAt(2)=='R' s.charAt(2) s.charAt s 2 'R' {
				count = 2;
			} count = 2 count 2 {
				count = 1;
			} count = 1 count 1 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;
		if(s.contains("R")){
			 if(s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2)){
					count = 3;
				}
			else if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			}
		}
		System.out.println(count);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;
		if(s.contains("R")){
			 if(s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2)){
					count = 3;
				}
			else if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			}
		}
		System.out.println(count);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count = 0;
		if(s.contains("R")){
			 if(s.charAt(0)==s.charAt(1)&&
						s.charAt(0)==s.charAt(2)){
					count = 3;
				}
			else if(s.charAt(0)=='R'&&s.charAt(1)=='R'
					|| s.charAt(1)=='R'&&s.charAt(2)=='R') {
				count = 2;
			}
			else {
				count = 1;
			}
		}
		System.out.println(count);
	}
}