import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		int ans = 0;
		String s = sc.nextLine();
		List<String> a = Arrays.asList(s.split(""));
		String[] array = a.toArray(new String[a.size()]);
		String hikaku = "R";
		
		for(int i=0;i<3;i++) {
			if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			}
		}
		
		System.out.println(ans);
	}
} import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		int ans = 0;
		String s = sc.nextLine();
		List<String> a = Arrays.asList(s.split(""));
		String[] array = a.toArray(new String[a.size()]);
		String hikaku = "R";
		
		for(int i=0;i<3;i++) {
			if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			}
		}
		
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		int ans = 0;
		String s = sc.nextLine();
		List<String> a = Arrays.asList(s.split(""));
		String[] array = a.toArray(new String[a.size()]);
		String hikaku = "R";
		
		for(int i=0;i<3;i++) {
			if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			}
		}
		
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		int ans = 0;
		String s = sc.nextLine();
		List<String> a = Arrays.asList(s.split(""));
		String[] array = a.toArray(new String[a.size()]);
		String hikaku = "R";
		
		for(int i=0;i<3;i++) {
			if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			}
		}
		
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int ans = 0; ans 0 String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc List<String> a = Arrays.asList(s.split("")); a Arrays.asList(s.split("")) Arrays.asList Arrays s.split("") s.split s "" String[] array = a.toArray(new String[a.size()]); array a.toArray(new String[a.size()]) a.toArray a new String[a.size()] a.size() a.size a String hikaku = "R"; hikaku "R" for(int i=0;i<3;i++) {
			if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			}
		} int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
			if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			}
		} {
			if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			}
		} if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			} array[i].equals("R") array[i].equals array[i] array i "R" {
				ans++;
			} ans++ ans if(i==1 && ans==1){
				break;
			} i==1 && ans==1 i==1 i 1 ans==1 ans 1 {
				break;
			} break; System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		int ans = 0;
		String s = sc.nextLine();
		List<String> a = Arrays.asList(s.split(""));
		String[] array = a.toArray(new String[a.size()]);
		String hikaku = "R";
		
		for(int i=0;i<3;i++) {
			if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			}
		}
		
		System.out.println(ans);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		int ans = 0;
		String s = sc.nextLine();
		List<String> a = Arrays.asList(s.split(""));
		String[] array = a.toArray(new String[a.size()]);
		String hikaku = "R";
		
		for(int i=0;i<3;i++) {
			if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			}
		}
		
		System.out.println(ans);
	}
} Main
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//int n=sc.nextInt();
		int ans = 0;
		String s = sc.nextLine();
		List<String> a = Arrays.asList(s.split(""));
		String[] array = a.toArray(new String[a.size()]);
		String hikaku = "R";
		
		for(int i=0;i<3;i++) {
			if(array[i].equals("R")){
				ans++;
			}
			else if(i==1 && ans==1){
				break;
			}
		}
		
		System.out.println(ans);
	}
}
