    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;

    public class Main {

        public static void main(String[] args) throws IOException {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();

            if(line.contains("RRR")){
                System.out.println("3");
            }
            else if(line.contains("RR")){
                System.out.println("2");
            }
            else if(line.contains("R")){
                System.out.println(1);
            }
            else {
                System.out.println(0);
            }
        }
    } import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

        public static void main(String[] args) throws IOException {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();

            if(line.contains("RRR")){
                System.out.println("3");
            }
            else if(line.contains("RR")){
                System.out.println("2");
            }
            else if(line.contains("R")){
                System.out.println(1);
            }
            else {
                System.out.println(0);
            }
        }
    } Main public static void main(String[] args) throws IOException {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();

            if(line.contains("RRR")){
                System.out.println("3");
            }
            else if(line.contains("RR")){
                System.out.println("2");
            }
            else if(line.contains("R")){
                System.out.println(1);
            }
            else {
                System.out.println(0);
            }
        } main {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();

            if(line.contains("RRR")){
                System.out.println("3");
            }
            else if(line.contains("RR")){
                System.out.println("2");
            }
            else if(line.contains("R")){
                System.out.println(1);
            }
            else {
                System.out.println(0);
            }
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br if(line.contains("RRR")){
                System.out.println("3");
            }
            else if(line.contains("RR")){
                System.out.println("2");
            }
            else if(line.contains("R")){
                System.out.println(1);
            }
            else {
                System.out.println(0);
            } line.contains("RRR") line.contains line "RRR" {
                System.out.println("3");
            } System.out.println("3") System.out.println System.out System System.out "3" if(line.contains("RR")){
                System.out.println("2");
            }
            else if(line.contains("R")){
                System.out.println(1);
            }
            else {
                System.out.println(0);
            } line.contains("RR") line.contains line "RR" {
                System.out.println("2");
            } System.out.println("2") System.out.println System.out System System.out "2" if(line.contains("R")){
                System.out.println(1);
            }
            else {
                System.out.println(0);
            } line.contains("R") line.contains line "R" {
                System.out.println(1);
            } System.out.println(1) System.out.println System.out System System.out 1 {
                System.out.println(0);
            } System.out.println(0) System.out.println System.out System System.out 0 String[] args args public class Main {

        public static void main(String[] args) throws IOException {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();

            if(line.contains("RRR")){
                System.out.println("3");
            }
            else if(line.contains("RR")){
                System.out.println("2");
            }
            else if(line.contains("R")){
                System.out.println(1);
            }
            else {
                System.out.println(0);
            }
        }
    } public class Main {

        public static void main(String[] args) throws IOException {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();

            if(line.contains("RRR")){
                System.out.println("3");
            }
            else if(line.contains("RR")){
                System.out.println("2");
            }
            else if(line.contains("R")){
                System.out.println(1);
            }
            else {
                System.out.println(0);
            }
        }
    } Main
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;

    public class Main {

        public static void main(String[] args) throws IOException {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = br.readLine();

            if(line.contains("RRR")){
                System.out.println("3");
            }
            else if(line.contains("RR")){
                System.out.println("2");
            }
            else if(line.contains("R")){
                System.out.println(1);
            }
            else {
                System.out.println(0);
            }
        }
    }