import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException{
		String input = new BufferedReader(new InputStreamReader(System.in)).readLine();
		String s1 = input.substring(0,1);
		String s2 = input.substring(1,2);
		String s3 = input.substring(2,3);
		int day = 0;
		
		if(s1.equals("R")) {
			day = 1;
			if(s2.equals("R")) {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			}
		}
		else if(s2.equals("R")) {
			day = 1;
			if(s3.equals("R")) {
				day = 2;
			}	
		}
		else if(s3.equals("R")) {
			day = 1;
		}

		System.out.println(day);

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException{
		String input = new BufferedReader(new InputStreamReader(System.in)).readLine();
		String s1 = input.substring(0,1);
		String s2 = input.substring(1,2);
		String s3 = input.substring(2,3);
		int day = 0;
		
		if(s1.equals("R")) {
			day = 1;
			if(s2.equals("R")) {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			}
		}
		else if(s2.equals("R")) {
			day = 1;
			if(s3.equals("R")) {
				day = 2;
			}	
		}
		else if(s3.equals("R")) {
			day = 1;
		}

		System.out.println(day);

	}

} Main public static void main(String[] args) throws IOException{
		String input = new BufferedReader(new InputStreamReader(System.in)).readLine();
		String s1 = input.substring(0,1);
		String s2 = input.substring(1,2);
		String s3 = input.substring(2,3);
		int day = 0;
		
		if(s1.equals("R")) {
			day = 1;
			if(s2.equals("R")) {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			}
		}
		else if(s2.equals("R")) {
			day = 1;
			if(s3.equals("R")) {
				day = 2;
			}	
		}
		else if(s3.equals("R")) {
			day = 1;
		}

		System.out.println(day);

	} main {
		String input = new BufferedReader(new InputStreamReader(System.in)).readLine();
		String s1 = input.substring(0,1);
		String s2 = input.substring(1,2);
		String s3 = input.substring(2,3);
		int day = 0;
		
		if(s1.equals("R")) {
			day = 1;
			if(s2.equals("R")) {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			}
		}
		else if(s2.equals("R")) {
			day = 1;
			if(s3.equals("R")) {
				day = 2;
			}	
		}
		else if(s3.equals("R")) {
			day = 1;
		}

		System.out.println(day);

	} String input = new BufferedReader(new InputStreamReader(System.in)).readLine(); input new BufferedReader(new InputStreamReader(System.in)).readLine() new BufferedReader(new InputStreamReader(System.in)).readLine new BufferedReader(new InputStreamReader(System.in)) String s1 = input.substring(0,1); s1 input.substring(0,1) input.substring input 0 1 String s2 = input.substring(1,2); s2 input.substring(1,2) input.substring input 1 2 String s3 = input.substring(2,3); s3 input.substring(2,3) input.substring input 2 3 int day = 0; day 0 if(s1.equals("R")) {
			day = 1;
			if(s2.equals("R")) {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			}
		}
		else if(s2.equals("R")) {
			day = 1;
			if(s3.equals("R")) {
				day = 2;
			}	
		}
		else if(s3.equals("R")) {
			day = 1;
		} s1.equals("R") s1.equals s1 "R" {
			day = 1;
			if(s2.equals("R")) {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			}
		} day = 1 day 1 if(s2.equals("R")) {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			} s2.equals("R") s2.equals s2 "R" {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			} day = 2 day 2 if(s3.equals("R")) {
					day = 3;
				} s3.equals("R") s3.equals s3 "R" {
					day = 3;
				} day = 3 day 3 if(s2.equals("R")) {
			day = 1;
			if(s3.equals("R")) {
				day = 2;
			}	
		}
		else if(s3.equals("R")) {
			day = 1;
		} s2.equals("R") s2.equals s2 "R" {
			day = 1;
			if(s3.equals("R")) {
				day = 2;
			}	
		} day = 1 day 1 if(s3.equals("R")) {
				day = 2;
			} s3.equals("R") s3.equals s3 "R" {
				day = 2;
			} day = 2 day 2 if(s3.equals("R")) {
			day = 1;
		} s3.equals("R") s3.equals s3 "R" {
			day = 1;
		} day = 1 day 1 System.out.println(day) System.out.println System.out System System.out day String[] args args public class Main {

	public static void main(String[] args) throws IOException{
		String input = new BufferedReader(new InputStreamReader(System.in)).readLine();
		String s1 = input.substring(0,1);
		String s2 = input.substring(1,2);
		String s3 = input.substring(2,3);
		int day = 0;
		
		if(s1.equals("R")) {
			day = 1;
			if(s2.equals("R")) {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			}
		}
		else if(s2.equals("R")) {
			day = 1;
			if(s3.equals("R")) {
				day = 2;
			}	
		}
		else if(s3.equals("R")) {
			day = 1;
		}

		System.out.println(day);

	}

} public class Main {

	public static void main(String[] args) throws IOException{
		String input = new BufferedReader(new InputStreamReader(System.in)).readLine();
		String s1 = input.substring(0,1);
		String s2 = input.substring(1,2);
		String s3 = input.substring(2,3);
		int day = 0;
		
		if(s1.equals("R")) {
			day = 1;
			if(s2.equals("R")) {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			}
		}
		else if(s2.equals("R")) {
			day = 1;
			if(s3.equals("R")) {
				day = 2;
			}	
		}
		else if(s3.equals("R")) {
			day = 1;
		}

		System.out.println(day);

	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException{
		String input = new BufferedReader(new InputStreamReader(System.in)).readLine();
		String s1 = input.substring(0,1);
		String s2 = input.substring(1,2);
		String s3 = input.substring(2,3);
		int day = 0;
		
		if(s1.equals("R")) {
			day = 1;
			if(s2.equals("R")) {
				day = 2;
				if(s3.equals("R")) {
					day = 3;
				}	
			}
		}
		else if(s2.equals("R")) {
			day = 1;
			if(s3.equals("R")) {
				day = 2;
			}	
		}
		else if(s3.equals("R")) {
			day = 1;
		}

		System.out.println(day);

	}

}