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

import java.util.StringTokenizer;


public class Main {

    private final static FastReader in = new FastReader();
    private static final PrintWriter out = new PrintWriter(System.out);


    public static int solve(String s) {
        if (s.contains("R")) {
            if (s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 3;
            } else if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            }
        }
        return 0;

    }

    public static void main(String[] args) {

        out.println(solve(in.next()));

        out.flush();
    }

    private static final class FastReader {
        private static BufferedReader BF;
        private static StringTokenizer ST;

        public FastReader() {
            BF = new BufferedReader(new InputStreamReader(System.in));
            ST = null;
        }


        public final String next() {
            while (ST == null || !ST.hasMoreTokens()) {
                try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return ST.nextToken();

        }

        final int nextInt() {
            return Integer.parseInt(next());
        }

    }


} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {

    private final static FastReader in = new FastReader();
    private static final PrintWriter out = new PrintWriter(System.out);


    public static int solve(String s) {
        if (s.contains("R")) {
            if (s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 3;
            } else if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            }
        }
        return 0;

    }

    public static void main(String[] args) {

        out.println(solve(in.next()));

        out.flush();
    }

    private static final class FastReader {
        private static BufferedReader BF;
        private static StringTokenizer ST;

        public FastReader() {
            BF = new BufferedReader(new InputStreamReader(System.in));
            ST = null;
        }


        public final String next() {
            while (ST == null || !ST.hasMoreTokens()) {
                try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return ST.nextToken();

        }

        final int nextInt() {
            return Integer.parseInt(next());
        }

    }


} Main private final static FastReader in = new FastReader(); in new FastReader() private static final PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) public static int solve(String s) {
        if (s.contains("R")) {
            if (s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 3;
            } else if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            }
        }
        return 0;

    } solve {
        if (s.contains("R")) {
            if (s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 3;
            } else if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            }
        }
        return 0;

    } if (s.contains("R")) {
            if (s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 3;
            } else if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            }
        } s.contains("R") s.contains s "R" {
            if (s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 3;
            } else if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            }
        } if (s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 3;
            } else if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            } s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R' s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R' s.charAt(0) == 'R' s.charAt(0) s.charAt s 0 'R' s.charAt(1) == 'R' s.charAt(1) s.charAt s 1 'R' s.charAt(2) == 'R' s.charAt(2) s.charAt s 2 'R' {
                return 3;
            } return 3; 3 if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            } s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R' s.charAt(0) == 'R' && s.charAt(1) == 'R' s.charAt(0) == 'R' s.charAt(0) s.charAt s 0 'R' s.charAt(1) == 'R' s.charAt(1) s.charAt s 1 'R' s.charAt(1) == 'R' && s.charAt(2) == 'R' s.charAt(1) == 'R' s.charAt(1) s.charAt s 1 'R' s.charAt(2) == 'R' s.charAt(2) s.charAt s 2 'R' {
                return 2;
            } return 2; 2 {
                return 1;
            } return 1; 1 return 0; 0 String s s public static void main(String[] args) {

        out.println(solve(in.next()));

        out.flush();
    } main {

        out.println(solve(in.next()));

        out.flush();
    } out.println(solve(in.next())) out.println out solve(in.next()) solve in.next() in.next in out.flush() out.flush out String[] args args private static final class FastReader {
        private static BufferedReader BF;
        private static StringTokenizer ST;

        public FastReader() {
            BF = new BufferedReader(new InputStreamReader(System.in));
            ST = null;
        }


        public final String next() {
            while (ST == null || !ST.hasMoreTokens()) {
                try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return ST.nextToken();

        }

        final int nextInt() {
            return Integer.parseInt(next());
        }

    } FastReader private static BufferedReader BF; BF private static StringTokenizer ST; ST public FastReader() {
            BF = new BufferedReader(new InputStreamReader(System.in));
            ST = null;
        } FastReader {
            BF = new BufferedReader(new InputStreamReader(System.in));
            ST = null;
        } BF = new BufferedReader(new InputStreamReader(System.in)) BF new BufferedReader(new InputStreamReader(System.in)) ST = null ST null public final String next() {
            while (ST == null || !ST.hasMoreTokens()) {
                try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return ST.nextToken();

        } next {
            while (ST == null || !ST.hasMoreTokens()) {
                try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return ST.nextToken();

        } while (ST == null || !ST.hasMoreTokens()) {
                try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } ST == null || !ST.hasMoreTokens() ST == null ST null !ST.hasMoreTokens() ST.hasMoreTokens() ST.hasMoreTokens ST {
                try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    ST = new StringTokenizer(BF.readLine());
                } ST = new StringTokenizer(BF.readLine()) ST new StringTokenizer(BF.readLine()) return ST.nextToken(); ST.nextToken() ST.nextToken ST final int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public class Main {

    private final static FastReader in = new FastReader();
    private static final PrintWriter out = new PrintWriter(System.out);


    public static int solve(String s) {
        if (s.contains("R")) {
            if (s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 3;
            } else if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            }
        }
        return 0;

    }

    public static void main(String[] args) {

        out.println(solve(in.next()));

        out.flush();
    }

    private static final class FastReader {
        private static BufferedReader BF;
        private static StringTokenizer ST;

        public FastReader() {
            BF = new BufferedReader(new InputStreamReader(System.in));
            ST = null;
        }


        public final String next() {
            while (ST == null || !ST.hasMoreTokens()) {
                try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return ST.nextToken();

        }

        final int nextInt() {
            return Integer.parseInt(next());
        }

    }


} public class Main {

    private final static FastReader in = new FastReader();
    private static final PrintWriter out = new PrintWriter(System.out);


    public static int solve(String s) {
        if (s.contains("R")) {
            if (s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 3;
            } else if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            }
        }
        return 0;

    }

    public static void main(String[] args) {

        out.println(solve(in.next()));

        out.flush();
    }

    private static final class FastReader {
        private static BufferedReader BF;
        private static StringTokenizer ST;

        public FastReader() {
            BF = new BufferedReader(new InputStreamReader(System.in));
            ST = null;
        }


        public final String next() {
            while (ST == null || !ST.hasMoreTokens()) {
                try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return ST.nextToken();

        }

        final int nextInt() {
            return Integer.parseInt(next());
        }

    }


} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

import java.util.StringTokenizer;


public class Main {

    private final static FastReader in = new FastReader();
    private static final PrintWriter out = new PrintWriter(System.out);


    public static int solve(String s) {
        if (s.contains("R")) {
            if (s.charAt(0) == 'R' && s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 3;
            } else if (s.charAt(0) == 'R' && s.charAt(1) == 'R' ||
                    s.charAt(1) == 'R' && s.charAt(2) == 'R') {
                return 2;
            } else {
                return 1;
            }
        }
        return 0;

    }

    public static void main(String[] args) {

        out.println(solve(in.next()));

        out.flush();
    }

    private static final class FastReader {
        private static BufferedReader BF;
        private static StringTokenizer ST;

        public FastReader() {
            BF = new BufferedReader(new InputStreamReader(System.in));
            ST = null;
        }


        public final String next() {
            while (ST == null || !ST.hasMoreTokens()) {
                try {
                    ST = new StringTokenizer(BF.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return ST.nextToken();

        }

        final int nextInt() {
            return Integer.parseInt(next());
        }

    }


}
