import java.util.*;

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

		int result=0;
		boolean flag = false;
		for(int i = 0; i < 3; i++){
			if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			}
		}

		System.out.println(result);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();

		int result=0;
		boolean flag = false;
		for(int i = 0; i < 3; i++){
			if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			}
		}

		System.out.println(result);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();

		int result=0;
		boolean flag = false;
		for(int i = 0; i < 3; i++){
			if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			}
		}

		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();

		int result=0;
		boolean flag = false;
		for(int i = 0; i < 3; i++){
			if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			}
		}

		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc int result=0; result 0 boolean flag = false; flag false for(int i = 0; i < 3; i++){
			if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			}
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			}
		} {
			if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			}
		} if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			} str.charAt(i) == 'R' str.charAt(i) str.charAt str i 'R' {
				result++;
				flag = true;
			} result++ result flag = true flag true {
				if(flag == true) break;
			} if(flag == true) break; flag == true flag true break; System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();

		int result=0;
		boolean flag = false;
		for(int i = 0; i < 3; i++){
			if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			}
		}

		System.out.println(result);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();

		int result=0;
		boolean flag = false;
		for(int i = 0; i < 3; i++){
			if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			}
		}

		System.out.println(result);
	}
} Main
import java.util.*;

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

		int result=0;
		boolean flag = false;
		for(int i = 0; i < 3; i++){
			if(str.charAt(i) == 'R'){
				result++;
				flag = true;
			}
			else{
				if(flag == true) break;
			}
		}

		System.out.println(result);
	}
}
