import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int day = 0;
		int daymax = 0;
		for (int d=0;d < S.length() ;d++ ) {
			if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			}
			daymax = Math.max(daymax,day);
		}
		System.out.println(daymax);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int day = 0;
		int daymax = 0;
		for (int d=0;d < S.length() ;d++ ) {
			if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			}
			daymax = Math.max(daymax,day);
		}
		System.out.println(daymax);
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int day = 0;
		int daymax = 0;
		for (int d=0;d < S.length() ;d++ ) {
			if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			}
			daymax = Math.max(daymax,day);
		}
		System.out.println(daymax);
	} main {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int day = 0;
		int daymax = 0;
		for (int d=0;d < S.length() ;d++ ) {
			if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			}
			daymax = Math.max(daymax,day);
		}
		System.out.println(daymax);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan int day = 0; day 0 int daymax = 0; daymax 0 for (int d=0;d < S.length() ;d++ ) {
			if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			}
			daymax = Math.max(daymax,day);
		} int d=0; int d=0; d 0 d < S.length() d S.length() S.length S d++ d++ d {
			if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			}
			daymax = Math.max(daymax,day);
		} {
			if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			}
			daymax = Math.max(daymax,day);
		} if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			} S.charAt(d) == 'R' S.charAt(d) S.charAt S d 'R' {
				day++;
			} day++ day {
				day = 0;
			} day = 0 day 0 daymax = Math.max(daymax,day) daymax Math.max(daymax,day) Math.max Math daymax day System.out.println(daymax) System.out.println System.out System System.out daymax String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int day = 0;
		int daymax = 0;
		for (int d=0;d < S.length() ;d++ ) {
			if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			}
			daymax = Math.max(daymax,day);
		}
		System.out.println(daymax);
	}

} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int day = 0;
		int daymax = 0;
		for (int d=0;d < S.length() ;d++ ) {
			if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			}
			daymax = Math.max(daymax,day);
		}
		System.out.println(daymax);
	}

} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String S = scan.next();
		int day = 0;
		int daymax = 0;
		for (int d=0;d < S.length() ;d++ ) {
			if (S.charAt(d) == 'R') {
				day++;
			} else {
				day = 0;
			}
			daymax = Math.max(daymax,day);
		}
		System.out.println(daymax);
	}

}
