import java.util.Scanner;

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

		int result = 0;
		if(record.indexOf("R") > -1) {
			result = 1;
		}

		if(record.indexOf("RR") > -1) {
			result = 2;
		}

		if(record.indexOf("RRR") > -1) {
			result = 3;
		}

		System.out.println(result);

	}

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

		int result = 0;
		if(record.indexOf("R") > -1) {
			result = 1;
		}

		if(record.indexOf("RR") > -1) {
			result = 2;
		}

		if(record.indexOf("RRR") > -1) {
			result = 3;
		}

		System.out.println(result);

	}

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

		int result = 0;
		if(record.indexOf("R") > -1) {
			result = 1;
		}

		if(record.indexOf("RR") > -1) {
			result = 2;
		}

		if(record.indexOf("RRR") > -1) {
			result = 3;
		}

		System.out.println(result);

	} main {
		Scanner sc = new Scanner(System.in);
		String record = sc.next();
		sc.close();

		int result = 0;
		if(record.indexOf("R") > -1) {
			result = 1;
		}

		if(record.indexOf("RR") > -1) {
			result = 2;
		}

		if(record.indexOf("RRR") > -1) {
			result = 3;
		}

		System.out.println(result);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String record = sc.next(); record sc.next() sc.next sc sc.close() sc.close sc int result = 0; result 0 if(record.indexOf("R") > -1) {
			result = 1;
		} record.indexOf("R") > -1 record.indexOf("R") record.indexOf record "R" -1 1 {
			result = 1;
		} result = 1 result 1 if(record.indexOf("RR") > -1) {
			result = 2;
		} record.indexOf("RR") > -1 record.indexOf("RR") record.indexOf record "RR" -1 1 {
			result = 2;
		} result = 2 result 2 if(record.indexOf("RRR") > -1) {
			result = 3;
		} record.indexOf("RRR") > -1 record.indexOf("RRR") record.indexOf record "RRR" -1 1 {
			result = 3;
		} result = 3 result 3 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 record = sc.next();
		sc.close();

		int result = 0;
		if(record.indexOf("R") > -1) {
			result = 1;
		}

		if(record.indexOf("RR") > -1) {
			result = 2;
		}

		if(record.indexOf("RRR") > -1) {
			result = 3;
		}

		System.out.println(result);

	}

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

		int result = 0;
		if(record.indexOf("R") > -1) {
			result = 1;
		}

		if(record.indexOf("RR") > -1) {
			result = 2;
		}

		if(record.indexOf("RRR") > -1) {
			result = 3;
		}

		System.out.println(result);

	}

} Main
import java.util.Scanner;

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

		int result = 0;
		if(record.indexOf("R") > -1) {
			result = 1;
		}

		if(record.indexOf("RR") > -1) {
			result = 2;
		}

		if(record.indexOf("RRR") > -1) {
			result = 3;
		}

		System.out.println(result);

	}

}