import java.util.Scanner;

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

		int continuousRain = 0; // 連続雨の日数
		int weatherYesterday = 0; // 昨日の天気

		String input = sc.next();

		for(int i = 0; i < 3; i++) {
			if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			}
		}

		System.out.println(continuousRain);

		sc.close();

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

		int continuousRain = 0; // 連続雨の日数
		int weatherYesterday = 0; // 昨日の天気

		String input = sc.next();

		for(int i = 0; i < 3; i++) {
			if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			}
		}

		System.out.println(continuousRain);

		sc.close();

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

		int continuousRain = 0; // 連続雨の日数
		int weatherYesterday = 0; // 昨日の天気

		String input = sc.next();

		for(int i = 0; i < 3; i++) {
			if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			}
		}

		System.out.println(continuousRain);

		sc.close();

	} main {
		Scanner sc = new Scanner(System.in);

		int continuousRain = 0; // 連続雨の日数
		int weatherYesterday = 0; // 昨日の天気

		String input = sc.next();

		for(int i = 0; i < 3; i++) {
			if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			}
		}

		System.out.println(continuousRain);

		sc.close();

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int continuousRain = 0; continuousRain 0 int weatherYesterday = 0; weatherYesterday 0 String input = sc.next(); input sc.next() sc.next sc for(int i = 0; i < 3; i++) {
			if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			}
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			}
		} {
			if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			}
		} if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			} input.charAt(i) == 'R' input.charAt(i) input.charAt input i 'R' {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				} weatherYesterday == 1 weatherYesterday 1 {
					continuousRain ++;
				} continuousRain ++ continuousRain {
					continuousRain = 1;
				} continuousRain = 1 continuousRain 1 weatherYesterday = 1 weatherYesterday 1 {
				weatherYesterday = 0;
			} weatherYesterday = 0 weatherYesterday 0 System.out.println(continuousRain) System.out.println System.out System System.out continuousRain sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int continuousRain = 0; // 連続雨の日数
		int weatherYesterday = 0; // 昨日の天気

		String input = sc.next();

		for(int i = 0; i < 3; i++) {
			if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			}
		}

		System.out.println(continuousRain);

		sc.close();

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

		int continuousRain = 0; // 連続雨の日数
		int weatherYesterday = 0; // 昨日の天気

		String input = sc.next();

		for(int i = 0; i < 3; i++) {
			if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			}
		}

		System.out.println(continuousRain);

		sc.close();

	}
} Main
import java.util.Scanner;

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

		int continuousRain = 0; // 連続雨の日数
		int weatherYesterday = 0; // 昨日の天気

		String input = sc.next();

		for(int i = 0; i < 3; i++) {
			if(input.charAt(i) == 'R') {
				if(weatherYesterday == 1) {
					continuousRain ++;
				} else {
					continuousRain = 1;
				}
				weatherYesterday = 1;
			} else {
				weatherYesterday = 0;
			}
		}

		System.out.println(continuousRain);

		sc.close();

	}
}
