import java.util.*;
import java.io.*;
class Main{
	public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out, true);
		String str=sc.nextLine();
		int max = 0;
		int count = 0;
		for(int i=0;i<str.length();i++){
			if(str.charAt(i)=='R'){
				count++;
				max = Math.max(count, max);
			}else{
				count = 0;
			}
		}
		out.println(max);
	}
} import java.util.*; util.* java import java.io.*; io.* java class Main{
	public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out, true);
		String str=sc.nextLine();
		int max = 0;
		int count = 0;
		for(int i=0;i<str.length();i++){
			if(str.charAt(i)=='R'){
				count++;
				max = Math.max(count, max);
			}else{
				count = 0;
			}
		}
		out.println(max);
	}
} Main public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out, true);
		String str=sc.nextLine();
		int max = 0;
		int count = 0;
		for(int i=0;i<str.length();i++){
			if(str.charAt(i)=='R'){
				count++;
				max = Math.max(count, max);
			}else{
				count = 0;
			}
		}
		out.println(max);
	} main {
		Scanner sc=new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out, true);
		String str=sc.nextLine();
		int max = 0;
		int count = 0;
		for(int i=0;i<str.length();i++){
			if(str.charAt(i)=='R'){
				count++;
				max = Math.max(count, max);
			}else{
				count = 0;
			}
		}
		out.println(max);
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out, true); out new PrintWriter(System.out, true) String str=sc.nextLine(); str sc.nextLine() sc.nextLine sc int max = 0; max 0 int count = 0; count 0 for(int i=0;i<str.length();i++){
			if(str.charAt(i)=='R'){
				count++;
				max = Math.max(count, max);
			}else{
				count = 0;
			}
		} int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
			if(str.charAt(i)=='R'){
				count++;
				max = Math.max(count, max);
			}else{
				count = 0;
			}
		} {
			if(str.charAt(i)=='R'){
				count++;
				max = Math.max(count, max);
			}else{
				count = 0;
			}
		} if(str.charAt(i)=='R'){
				count++;
				max = Math.max(count, max);
			}else{
				count = 0;
			} str.charAt(i)=='R' str.charAt(i) str.charAt str i 'R' {
				count++;
				max = Math.max(count, max);
			} count++ count max = Math.max(count, max) max Math.max(count, max) Math.max Math count max {
				count = 0;
			} count = 0 count 0 out.println(max) out.println out max String[]args args
import java.util.*;
import java.io.*;
class Main{
	public static void main(String[]args){
		Scanner sc=new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out, true);
		String str=sc.nextLine();
		int max = 0;
		int count = 0;
		for(int i=0;i<str.length();i++){
			if(str.charAt(i)=='R'){
				count++;
				max = Math.max(count, max);
			}else{
				count = 0;
			}
		}
		out.println(max);
	}
}
