import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		sc.close();

		int max = 0;
		int temp = 0;
		for(int i=0; i < str.length(); i++) {
			char c = str.charAt(i);
			if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			}
		}
		if(max < temp){
			max = temp;
		}
		System.out.println(max);
	}

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

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		sc.close();

		int max = 0;
		int temp = 0;
		for(int i=0; i < str.length(); i++) {
			char c = str.charAt(i);
			if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			}
		}
		if(max < temp){
			max = temp;
		}
		System.out.println(max);
	}

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

		int max = 0;
		int temp = 0;
		for(int i=0; i < str.length(); i++) {
			char c = str.charAt(i);
			if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			}
		}
		if(max < temp){
			max = temp;
		}
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		sc.close();

		int max = 0;
		int temp = 0;
		for(int i=0; i < str.length(); i++) {
			char c = str.charAt(i);
			if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			}
		}
		if(max < temp){
			max = temp;
		}
		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc sc.close() sc.close sc int max = 0; max 0 int temp = 0; temp 0 for(int i=0; i < str.length(); i++) {
			char c = str.charAt(i);
			if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			}
		} int i=0; int i=0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			char c = str.charAt(i);
			if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			}
		} {
			char c = str.charAt(i);
			if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			}
		} char c = str.charAt(i); c str.charAt(i) str.charAt str i if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			} c == 'R' c 'R' {
				temp++;
			} temp++ temp {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			} if(max < temp){
					max = temp;
					temp = 0;
				} max < temp max temp {
					max = temp;
					temp = 0;
				} max = temp max temp temp = 0 temp 0 if(max < temp){
			max = temp;
		} max < temp max temp {
			max = temp;
		} max = temp max temp 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) throws IOException {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		sc.close();

		int max = 0;
		int temp = 0;
		for(int i=0; i < str.length(); i++) {
			char c = str.charAt(i);
			if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			}
		}
		if(max < temp){
			max = temp;
		}
		System.out.println(max);
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		sc.close();

		int max = 0;
		int temp = 0;
		for(int i=0; i < str.length(); i++) {
			char c = str.charAt(i);
			if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			}
		}
		if(max < temp){
			max = temp;
		}
		System.out.println(max);
	}

} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		sc.close();

		int max = 0;
		int temp = 0;
		for(int i=0; i < str.length(); i++) {
			char c = str.charAt(i);
			if(c == 'R'){
				temp++;
			} else {
				if(max < temp){
					max = temp;
					temp = 0;
				}
			}
		}
		if(max < temp){
			max = temp;
		}
		System.out.println(max);
	}

}