import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String[] arr = sc.nextLine().split("");

		int count = 0;
		int max = 0;
		for(String str : arr){

			if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			}
		}


		if(count > max){
			max = count;
		}

		System.out.println(max);


	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String[] arr = sc.nextLine().split("");

		int count = 0;
		int max = 0;
		for(String str : arr){

			if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			}
		}


		if(count > max){
			max = count;
		}

		System.out.println(max);


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

		Scanner sc = new Scanner(System.in);
		String[] arr = sc.nextLine().split("");

		int count = 0;
		int max = 0;
		for(String str : arr){

			if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			}
		}


		if(count > max){
			max = count;
		}

		System.out.println(max);


	} main {

		Scanner sc = new Scanner(System.in);
		String[] arr = sc.nextLine().split("");

		int count = 0;
		int max = 0;
		for(String str : arr){

			if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			}
		}


		if(count > max){
			max = count;
		}

		System.out.println(max);


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] arr = sc.nextLine().split(""); arr sc.nextLine().split("") sc.nextLine().split sc.nextLine() sc.nextLine sc "" int count = 0; count 0 int max = 0; max 0 for(String str : arr){

			if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			}
		} String str arr {

			if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			}
		} {

			if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			}
		} if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			} str.equals("R") str.equals str "R" {
				count++;
			} count++ count {
				if(count > max){
					max = count;
				}
				count=0;
			} if(count > max){
					max = count;
				} count > max count max {
					max = count;
				} max = count max count count=0 count 0 if(count > max){
			max = count;
		} count > max count max {
			max = count;
		} max = count max count System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String[] arr = sc.nextLine().split("");

		int count = 0;
		int max = 0;
		for(String str : arr){

			if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			}
		}


		if(count > max){
			max = count;
		}

		System.out.println(max);


	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String[] arr = sc.nextLine().split("");

		int count = 0;
		int max = 0;
		for(String str : arr){

			if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			}
		}


		if(count > max){
			max = count;
		}

		System.out.println(max);


	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String[] arr = sc.nextLine().split("");

		int count = 0;
		int max = 0;
		for(String str : arr){

			if(str.equals("R")){
				count++;
			}else{
				if(count > max){
					max = count;
				}
				count=0;
			}
		}


		if(count > max){
			max = count;
		}

		System.out.println(max);


	}
}