import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		
		int count=0;
		char[] tenki = new char[3];
		char temp = 'R';
		
		for(int i=0; i < 3; i++) {
			tenki[i] = s.charAt(i);
		}
		
		if(tenki[0] == 'R') {
			count++;
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}else {
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}else {
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}
		
		
		
		
		
		System.out.println(count);
		
		
		
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		
		int count=0;
		char[] tenki = new char[3];
		char temp = 'R';
		
		for(int i=0; i < 3; i++) {
			tenki[i] = s.charAt(i);
		}
		
		if(tenki[0] == 'R') {
			count++;
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}else {
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}else {
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}
		
		
		
		
		
		System.out.println(count);
		
		
		
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		
		int count=0;
		char[] tenki = new char[3];
		char temp = 'R';
		
		for(int i=0; i < 3; i++) {
			tenki[i] = s.charAt(i);
		}
		
		if(tenki[0] == 'R') {
			count++;
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}else {
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}else {
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}
		
		
		
		
		
		System.out.println(count);
		
		
		
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		
		int count=0;
		char[] tenki = new char[3];
		char temp = 'R';
		
		for(int i=0; i < 3; i++) {
			tenki[i] = s.charAt(i);
		}
		
		if(tenki[0] == 'R') {
			count++;
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}else {
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}else {
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}
		
		
		
		
		
		System.out.println(count);
		
		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int count=0; count 0 char[] tenki = new char[3]; tenki new char[3] 3 char temp = 'R'; temp 'R' for(int i=0; i < 3; i++) {
			tenki[i] = s.charAt(i);
		} int i=0; int i=0; i 0 i < 3 i 3 i++ i++ i {
			tenki[i] = s.charAt(i);
		} {
			tenki[i] = s.charAt(i);
		} tenki[i] = s.charAt(i) tenki[i] tenki i s.charAt(i) s.charAt s i if(tenki[0] == 'R') {
			count++;
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}else {
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}else {
				if(tenki[2] == 'R') {
					count++;
				}
			}
		} tenki[0] == 'R' tenki[0] tenki 0 'R' {
			count++;
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}
		} count++ count if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			} tenki[1] == 'R' tenki[1] tenki 1 'R' {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			} count++ count if(tenki[2] == 'R') {
					count++;
				} tenki[2] == 'R' tenki[2] tenki 2 'R' {
					count++;
				} count++ count {
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}else {
				if(tenki[2] == 'R') {
					count++;
				}
			}
		} if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}else {
				if(tenki[2] == 'R') {
					count++;
				}
			} tenki[1] == 'R' tenki[1] tenki 1 'R' {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			} count++ count if(tenki[2] == 'R') {
					count++;
				} tenki[2] == 'R' tenki[2] tenki 2 'R' {
					count++;
				} count++ count {
				if(tenki[2] == 'R') {
					count++;
				}
			} if(tenki[2] == 'R') {
					count++;
				} tenki[2] == 'R' tenki[2] tenki 2 'R' {
					count++;
				} count++ count 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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		
		int count=0;
		char[] tenki = new char[3];
		char temp = 'R';
		
		for(int i=0; i < 3; i++) {
			tenki[i] = s.charAt(i);
		}
		
		if(tenki[0] == 'R') {
			count++;
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}else {
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}else {
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}
		
		
		
		
		
		System.out.println(count);
		
		
		
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		
		int count=0;
		char[] tenki = new char[3];
		char temp = 'R';
		
		for(int i=0; i < 3; i++) {
			tenki[i] = s.charAt(i);
		}
		
		if(tenki[0] == 'R') {
			count++;
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}else {
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}else {
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}
		
		
		
		
		
		System.out.println(count);
		
		
		
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		
		int count=0;
		char[] tenki = new char[3];
		char temp = 'R';
		
		for(int i=0; i < 3; i++) {
			tenki[i] = s.charAt(i);
		}
		
		if(tenki[0] == 'R') {
			count++;
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}else {
			if(tenki[1] == 'R') {
				count++;
				if(tenki[2] == 'R') {
					count++;
				}
			}else {
				if(tenki[2] == 'R') {
					count++;
				}
			}
		}
		
		
		
		
		
		System.out.println(count);
		
		
		
	}

}
