import java.io.*;
import java.util.*;

public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) throws IOException {
        String s = br.readLine();

        int count = 0;
        if (s.charAt(1) == 'R')
            count = 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0));
        else
            count = ((s.charAt(0) == 'R' ? 1 : 0)) | ((s.charAt(2) == 'R' ? 1 : 0));

        pw.println(count);
        pw.close();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) throws IOException {
        String s = br.readLine();

        int count = 0;
        if (s.charAt(1) == 'R')
            count = 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0));
        else
            count = ((s.charAt(0) == 'R' ? 1 : 0)) | ((s.charAt(2) == 'R' ? 1 : 0));

        pw.println(count);
        pw.close();
    }
} Main private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); pw new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) public static void main(String[] args) throws IOException {
        String s = br.readLine();

        int count = 0;
        if (s.charAt(1) == 'R')
            count = 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0));
        else
            count = ((s.charAt(0) == 'R' ? 1 : 0)) | ((s.charAt(2) == 'R' ? 1 : 0));

        pw.println(count);
        pw.close();
    } main {
        String s = br.readLine();

        int count = 0;
        if (s.charAt(1) == 'R')
            count = 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0));
        else
            count = ((s.charAt(0) == 'R' ? 1 : 0)) | ((s.charAt(2) == 'R' ? 1 : 0));

        pw.println(count);
        pw.close();
    } String s = br.readLine(); s br.readLine() br.readLine br int count = 0; count 0 if (s.charAt(1) == 'R')
            count = 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0));
        else
            count = ((s.charAt(0) == 'R' ? 1 : 0)) | ((s.charAt(2) == 'R' ? 1 : 0)); s.charAt(1) == 'R' s.charAt(1) s.charAt s 1 'R' count = 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0)) count 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0)) 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0)) 1 ((s.charAt(0) == 'R' ? 1 : 0)) s.charAt(0) == 'R' s.charAt(0) s.charAt s 0 'R' 1 0 ((s.charAt(2) == 'R' ? 1 : 0)) s.charAt(2) == 'R' s.charAt(2) s.charAt s 2 'R' 1 0 count = ((s.charAt(0) == 'R' ? 1 : 0)) | ((s.charAt(2) == 'R' ? 1 : 0)) count ((s.charAt(0) == 'R' ? 1 : 0)) | ((s.charAt(2) == 'R' ? 1 : 0)) ((s.charAt(0) == 'R' ? 1 : 0)) s.charAt(0) == 'R' s.charAt(0) s.charAt s 0 'R' 1 0 ((s.charAt(2) == 'R' ? 1 : 0)) s.charAt(2) == 'R' s.charAt(2) s.charAt s 2 'R' 1 0 pw.println(count) pw.println pw count pw.close() pw.close pw String[] args args public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) throws IOException {
        String s = br.readLine();

        int count = 0;
        if (s.charAt(1) == 'R')
            count = 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0));
        else
            count = ((s.charAt(0) == 'R' ? 1 : 0)) | ((s.charAt(2) == 'R' ? 1 : 0));

        pw.println(count);
        pw.close();
    }
} public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) throws IOException {
        String s = br.readLine();

        int count = 0;
        if (s.charAt(1) == 'R')
            count = 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0));
        else
            count = ((s.charAt(0) == 'R' ? 1 : 0)) | ((s.charAt(2) == 'R' ? 1 : 0));

        pw.println(count);
        pw.close();
    }
} Main
import java.io.*;
import java.util.*;

public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) throws IOException {
        String s = br.readLine();

        int count = 0;
        if (s.charAt(1) == 'R')
            count = 1 + ((s.charAt(0) == 'R' ? 1 : 0)) + ((s.charAt(2) == 'R' ? 1 : 0));
        else
            count = ((s.charAt(0) == 'R' ? 1 : 0)) | ((s.charAt(2) == 'R' ? 1 : 0));

        pw.println(count);
        pw.close();
    }
}
