import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		int count = 0;

		for(int i = 0; i < 3; i++) {


				if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			}

		}
		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 str = sc.next();

		int count = 0;

		for(int i = 0; i < 3; i++) {


				if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			}

		}
		System.out.println(count);

	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		int count = 0;

		for(int i = 0; i < 3; i++) {


				if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			}

		}
		System.out.println(count);

	} main {

		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		int count = 0;

		for(int i = 0; i < 3; i++) {


				if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			}

		}
		System.out.println(count);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int count = 0; count 0 for(int i = 0; i < 3; i++) {


				if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			}

		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {


				if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			}

		} {


				if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			}

		} if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			} count > 0 count 0 {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					} str.charAt(i) == 'R' str.charAt(i) str.charAt str i 'R' {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					} if(str.charAt(i-1) == 'R') {
							count++;
						} str.charAt(i-1) == 'R' str.charAt(i-1) str.charAt str i-1 i 1 'R' {
							count++;
						} count++ count {
				if(str.charAt(i) == 'R') {
					count++;
				}
			} if(str.charAt(i) == 'R') {
					count++;
				} str.charAt(i) == 'R' str.charAt(i) str.charAt str i '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) {

		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		int count = 0;

		for(int i = 0; i < 3; i++) {


				if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			}

		}
		System.out.println(count);

	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String str = sc.next();

		int count = 0;

		for(int i = 0; i < 3; i++) {


				if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			}

		}
		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 str = sc.next();

		int count = 0;

		for(int i = 0; i < 3; i++) {


				if(count > 0) {
					if(str.charAt(i) == 'R') {
						if(str.charAt(i-1) == 'R') {
							count++;
						}
					}



			} else {
				if(str.charAt(i) == 'R') {
					count++;
				}
			}

		}
		System.out.println(count);

	}

}