import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String Word=new String();
		Word=sc.next();
		sc.close();
		Character word[]=new Character[3];
		for(int i=0;i<3;i++)
			word[i]=Word.charAt(i);
		int count=0;
		int max=0;
		for(int i=0;i<3;i++) {
			if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			}
		}
		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 Word=new String();
		Word=sc.next();
		sc.close();
		Character word[]=new Character[3];
		for(int i=0;i<3;i++)
			word[i]=Word.charAt(i);
		int count=0;
		int max=0;
		for(int i=0;i<3;i++) {
			if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			}
		}
		System.out.println(max);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String Word=new String();
		Word=sc.next();
		sc.close();
		Character word[]=new Character[3];
		for(int i=0;i<3;i++)
			word[i]=Word.charAt(i);
		int count=0;
		int max=0;
		for(int i=0;i<3;i++) {
			if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			}
		}
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		String Word=new String();
		Word=sc.next();
		sc.close();
		Character word[]=new Character[3];
		for(int i=0;i<3;i++)
			word[i]=Word.charAt(i);
		int count=0;
		int max=0;
		for(int i=0;i<3;i++) {
			if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			}
		}
		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String Word=new String(); Word new String() Word=sc.next() Word sc.next() sc.next sc sc.close() sc.close sc Character word[]=new Character[3]; word new Character[3] 3 for(int i=0;i<3;i++)
			word[i]=Word.charAt(i); int i=0; int i=0; i 0 i<3 i 3 i++ i++ i word[i]=Word.charAt(i); word[i]=Word.charAt(i) word[i] word i Word.charAt(i) Word.charAt Word i int count=0; count 0 int max=0; max 0 for(int i=0;i<3;i++) {
			if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			}
		} int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
			if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			}
		} {
			if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			}
		} if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			} word[i].equals('R') word[i].equals word[i] word i 'R' {
				count++;
				if(count>max)
					max=count;
			} count++ count if(count>max)
					max=count; count>max count max max=count max count {
				count=0;
			} count=0 count 0 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 Word=new String();
		Word=sc.next();
		sc.close();
		Character word[]=new Character[3];
		for(int i=0;i<3;i++)
			word[i]=Word.charAt(i);
		int count=0;
		int max=0;
		for(int i=0;i<3;i++) {
			if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			}
		}
		System.out.println(max);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String Word=new String();
		Word=sc.next();
		sc.close();
		Character word[]=new Character[3];
		for(int i=0;i<3;i++)
			word[i]=Word.charAt(i);
		int count=0;
		int max=0;
		for(int i=0;i<3;i++) {
			if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			}
		}
		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 Word=new String();
		Word=sc.next();
		sc.close();
		Character word[]=new Character[3];
		for(int i=0;i<3;i++)
			word[i]=Word.charAt(i);
		int count=0;
		int max=0;
		for(int i=0;i<3;i++) {
			if(word[i].equals('R')) {
				count++;
				if(count>max)
					max=count;
			}else {
				count=0;
			}
		}
		System.out.println(max);
	}
}
