import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String scLine = sc.nextLine();
        int result = 0;
        int maxResult = 0;

        for (int i = 0; i < scLine.length(); i++){
        	if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	}
        }

        System.out.println(maxResult);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String scLine = sc.nextLine();
        int result = 0;
        int maxResult = 0;

        for (int i = 0; i < scLine.length(); i++){
        	if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	}
        }

        System.out.println(maxResult);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String scLine = sc.nextLine();
        int result = 0;
        int maxResult = 0;

        for (int i = 0; i < scLine.length(); i++){
        	if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	}
        }

        System.out.println(maxResult);
	} main {
		Scanner sc = new Scanner(System.in);
        String scLine = sc.nextLine();
        int result = 0;
        int maxResult = 0;

        for (int i = 0; i < scLine.length(); i++){
        	if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	}
        }

        System.out.println(maxResult);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String scLine = sc.nextLine(); scLine sc.nextLine() sc.nextLine sc int result = 0; result 0 int maxResult = 0; maxResult 0 for (int i = 0; i < scLine.length(); i++){
        	if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	}
        } int i = 0; int i = 0; i 0 i < scLine.length() i scLine.length() scLine.length scLine i++ i++ i {
        	if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	}
        } {
        	if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	}
        } if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	} scLine.substring(i,i + 1).equals("R") scLine.substring(i,i + 1).equals scLine.substring(i,i + 1) scLine.substring scLine i i + 1 i 1 "R" {
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	} result = ++result result ++result result if(result > maxResult){
        			maxResult = result;
        		} result > maxResult result maxResult {
        			maxResult = result;
        		} maxResult = result maxResult result if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	} scLine.substring(i, i + 1).equals("S") scLine.substring(i, i + 1).equals scLine.substring(i, i + 1) scLine.substring scLine i i + 1 i 1 "S" {
        		result = 0;
        	} result = 0 result 0 System.out.println(maxResult) System.out.println System.out System System.out maxResult String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String scLine = sc.nextLine();
        int result = 0;
        int maxResult = 0;

        for (int i = 0; i < scLine.length(); i++){
        	if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	}
        }

        System.out.println(maxResult);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String scLine = sc.nextLine();
        int result = 0;
        int maxResult = 0;

        for (int i = 0; i < scLine.length(); i++){
        	if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	}
        }

        System.out.println(maxResult);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String scLine = sc.nextLine();
        int result = 0;
        int maxResult = 0;

        for (int i = 0; i < scLine.length(); i++){
        	if(scLine.substring(i,i + 1).equals("R")){
        		result = ++result;
        		if(result > maxResult){
        			maxResult = result;
        		}
        	}
        	else if(scLine.substring(i, i + 1).equals("S")){
        		result = 0;
        	}
        }

        System.out.println(maxResult);
	}
}
