import java.util.Scanner;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	String S = sc.next();
      	String[] Rain = S.split("S");
      	
      	int max_r = 0;
      	for(String r : Rain){
        	if(max_r < r.length()){
            	max_r = r.length();
            }
        }
    System.out.println(max_r);
    }
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	String S = sc.next();
      	String[] Rain = S.split("S");
      	
      	int max_r = 0;
      	for(String r : Rain){
        	if(max_r < r.length()){
            	max_r = r.length();
            }
        }
    System.out.println(max_r);
    }
} Main public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	String S = sc.next();
      	String[] Rain = S.split("S");
      	
      	int max_r = 0;
      	for(String r : Rain){
        	if(max_r < r.length()){
            	max_r = r.length();
            }
        }
    System.out.println(max_r);
    } main {
    	Scanner sc = new Scanner(System.in);
      	String S = sc.next();
      	String[] Rain = S.split("S");
      	
      	int max_r = 0;
      	for(String r : Rain){
        	if(max_r < r.length()){
            	max_r = r.length();
            }
        }
    System.out.println(max_r);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String[] Rain = S.split("S"); Rain S.split("S") S.split S "S" int max_r = 0; max_r 0 for(String r : Rain){
        	if(max_r < r.length()){
            	max_r = r.length();
            }
        } String r Rain {
        	if(max_r < r.length()){
            	max_r = r.length();
            }
        } {
        	if(max_r < r.length()){
            	max_r = r.length();
            }
        } if(max_r < r.length()){
            	max_r = r.length();
            } max_r < r.length() max_r r.length() r.length r {
            	max_r = r.length();
            } max_r = r.length() max_r r.length() r.length r System.out.println(max_r) System.out.println System.out System System.out max_r String[] args args public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	String S = sc.next();
      	String[] Rain = S.split("S");
      	
      	int max_r = 0;
      	for(String r : Rain){
        	if(max_r < r.length()){
            	max_r = r.length();
            }
        }
    System.out.println(max_r);
    }
} public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	String S = sc.next();
      	String[] Rain = S.split("S");
      	
      	int max_r = 0;
      	for(String r : Rain){
        	if(max_r < r.length()){
            	max_r = r.length();
            }
        }
    System.out.println(max_r);
    }
} Main
import java.util.Scanner;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	String S = sc.next();
      	String[] Rain = S.split("S");
      	
      	int max_r = 0;
      	for(String r : Rain){
        	if(max_r < r.length()){
            	max_r = r.length();
            }
        }
    System.out.println(max_r);
    }
}