import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S=sc.next();
		int count=0;
		int tmp=0;
		char[] weather=new char[3];
		for(int i=0;i<3;i++){
			weather[i]=S.charAt(i);
		}
		for(int j=0;j<3;j++){
			if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			}
			
		}
		System.out.println(count);

	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S=sc.next();
		int count=0;
		int tmp=0;
		char[] weather=new char[3];
		for(int i=0;i<3;i++){
			weather[i]=S.charAt(i);
		}
		for(int j=0;j<3;j++){
			if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			}
			
		}
		System.out.println(count);

	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S=sc.next();
		int count=0;
		int tmp=0;
		char[] weather=new char[3];
		for(int i=0;i<3;i++){
			weather[i]=S.charAt(i);
		}
		for(int j=0;j<3;j++){
			if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			}
			
		}
		System.out.println(count);

	} main {
		Scanner sc = new Scanner(System.in);
		String S=sc.next();
		int count=0;
		int tmp=0;
		char[] weather=new char[3];
		for(int i=0;i<3;i++){
			weather[i]=S.charAt(i);
		}
		for(int j=0;j<3;j++){
			if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			}
			
		}
		System.out.println(count);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S=sc.next(); S sc.next() sc.next sc int count=0; count 0 int tmp=0; tmp 0 char[] weather=new char[3]; weather new char[3] 3 for(int i=0;i<3;i++){
			weather[i]=S.charAt(i);
		} int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
			weather[i]=S.charAt(i);
		} {
			weather[i]=S.charAt(i);
		} weather[i]=S.charAt(i) weather[i] weather i S.charAt(i) S.charAt S i for(int j=0;j<3;j++){
			if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			}
			
		} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
			if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			}
			
		} {
			if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			}
			
		} if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			} weather[j]=='R' weather[j] weather j 'R' {
				tmp++;
				if(count<tmp)count=tmp;
			} tmp++ tmp if(count<tmp)count=tmp; count<tmp count tmp count=tmp count tmp {
				if(count<tmp)count=tmp;
				tmp=0;
			} if(count<tmp)count=tmp; count<tmp count tmp count=tmp count tmp tmp=0 tmp 0 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S=sc.next();
		int count=0;
		int tmp=0;
		char[] weather=new char[3];
		for(int i=0;i<3;i++){
			weather[i]=S.charAt(i);
		}
		for(int j=0;j<3;j++){
			if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			}
			
		}
		System.out.println(count);

	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S=sc.next();
		int count=0;
		int tmp=0;
		char[] weather=new char[3];
		for(int i=0;i<3;i++){
			weather[i]=S.charAt(i);
		}
		for(int j=0;j<3;j++){
			if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			}
			
		}
		System.out.println(count);

	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String S=sc.next();
		int count=0;
		int tmp=0;
		char[] weather=new char[3];
		for(int i=0;i<3;i++){
			weather[i]=S.charAt(i);
		}
		for(int j=0;j<3;j++){
			if(weather[j]=='R'){
				tmp++;
				if(count<tmp)count=tmp;
			}else{
				if(count<tmp)count=tmp;
				tmp=0;
			}
			
		}
		System.out.println(count);

	}
}