import java.util.*;
 
class Main{
 
public static void main(String args[]){
 
Scanner s =  new Scanner(System.in);
		String s1 = s.next();
		 
		int count=0;int 
		maxcount=0;
		for(int i=0;i<s1.length();i++){
		 
		if(s1.charAt(i) == 'R') {
			count++;
			if(count>maxcount)
		        maxcount=count;
			//System.out.println(count);
		}
		else {
			
		count=0;
		       
		}
		    
		}
		 
		System.out.println(maxcount);
}
} import java.util.*; util.* java class Main{
 
public static void main(String args[]){
 
Scanner s =  new Scanner(System.in);
		String s1 = s.next();
		 
		int count=0;int 
		maxcount=0;
		for(int i=0;i<s1.length();i++){
		 
		if(s1.charAt(i) == 'R') {
			count++;
			if(count>maxcount)
		        maxcount=count;
			//System.out.println(count);
		}
		else {
			
		count=0;
		       
		}
		    
		}
		 
		System.out.println(maxcount);
}
} Main public static void main(String args[]){
 
Scanner s =  new Scanner(System.in);
		String s1 = s.next();
		 
		int count=0;int 
		maxcount=0;
		for(int i=0;i<s1.length();i++){
		 
		if(s1.charAt(i) == 'R') {
			count++;
			if(count>maxcount)
		        maxcount=count;
			//System.out.println(count);
		}
		else {
			
		count=0;
		       
		}
		    
		}
		 
		System.out.println(maxcount);
} main {
 
Scanner s =  new Scanner(System.in);
		String s1 = s.next();
		 
		int count=0;int 
		maxcount=0;
		for(int i=0;i<s1.length();i++){
		 
		if(s1.charAt(i) == 'R') {
			count++;
			if(count>maxcount)
		        maxcount=count;
			//System.out.println(count);
		}
		else {
			
		count=0;
		       
		}
		    
		}
		 
		System.out.println(maxcount);
} Scanner s =  new Scanner(System.in); s new Scanner(System.in) String s1 = s.next(); s1 s.next() s.next s int count=0; count 0 int 
		maxcount=0; maxcount 0 for(int i=0;i<s1.length();i++){
		 
		if(s1.charAt(i) == 'R') {
			count++;
			if(count>maxcount)
		        maxcount=count;
			//System.out.println(count);
		}
		else {
			
		count=0;
		       
		}
		    
		} int i=0; int i=0; i 0 i<s1.length() i s1.length() s1.length s1 i++ i++ i {
		 
		if(s1.charAt(i) == 'R') {
			count++;
			if(count>maxcount)
		        maxcount=count;
			//System.out.println(count);
		}
		else {
			
		count=0;
		       
		}
		    
		} {
		 
		if(s1.charAt(i) == 'R') {
			count++;
			if(count>maxcount)
		        maxcount=count;
			//System.out.println(count);
		}
		else {
			
		count=0;
		       
		}
		    
		} if(s1.charAt(i) == 'R') {
			count++;
			if(count>maxcount)
		        maxcount=count;
			//System.out.println(count);
		}
		else {
			
		count=0;
		       
		} s1.charAt(i) == 'R' s1.charAt(i) s1.charAt s1 i 'R' {
			count++;
			if(count>maxcount)
		        maxcount=count;
			//System.out.println(count);
		} count++ count if(count>maxcount)
		        maxcount=count; count>maxcount count maxcount maxcount=count maxcount count {
			
		count=0;
		       
		} count=0 count 0 System.out.println(maxcount) System.out.println System.out System System.out maxcount String args[] args
import java.util.*;
 
class Main{
 
public static void main(String args[]){
 
Scanner s =  new Scanner(System.in);
		String s1 = s.next();
		 
		int count=0;int 
		maxcount=0;
		for(int i=0;i<s1.length();i++){
		 
		if(s1.charAt(i) == 'R') {
			count++;
			if(count>maxcount)
		        maxcount=count;
			//System.out.println(count);
		}
		else {
			
		count=0;
		       
		}
		    
		}
		 
		System.out.println(maxcount);
}
}