import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		int count = 0;
		int ans = 0;
		for(int i = 0;i < s.length(); ++i){
			if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			}
		}
		ans = Math.max(ans,count);
		System.out.print(ans);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		int count = 0;
		int ans = 0;
		for(int i = 0;i < s.length(); ++i){
			if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			}
		}
		ans = Math.max(ans,count);
		System.out.print(ans);
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		int count = 0;
		int ans = 0;
		for(int i = 0;i < s.length(); ++i){
			if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			}
		}
		ans = Math.max(ans,count);
		System.out.print(ans);
	} main {
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		int count = 0;
		int ans = 0;
		for(int i = 0;i < s.length(); ++i){
			if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			}
		}
		ans = Math.max(ans,count);
		System.out.print(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan int count = 0; count 0 int ans = 0; ans 0 for(int i = 0;i < s.length(); ++i){
			if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s ++i ++i i {
			if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			}
		} {
			if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			}
		} if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			} s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' count++ count {
				ans = Math.max(ans, count);
				count = 0;
			} ans = Math.max(ans, count) ans Math.max(ans, count) Math.max Math ans count count = 0 count 0 ans = Math.max(ans,count) ans Math.max(ans,count) Math.max Math ans count System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		int count = 0;
		int ans = 0;
		for(int i = 0;i < s.length(); ++i){
			if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			}
		}
		ans = Math.max(ans,count);
		System.out.print(ans);
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		int count = 0;
		int ans = 0;
		for(int i = 0;i < s.length(); ++i){
			if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			}
		}
		ans = Math.max(ans,count);
		System.out.print(ans);
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String s = scan.next();
		int count = 0;
		int ans = 0;
		for(int i = 0;i < s.length(); ++i){
			if(s.charAt(i) == 'R')count++;
			else{
				ans = Math.max(ans, count);
				count = 0;
			}
		}
		ans = Math.max(ans,count);
		System.out.print(ans);
	}
}
