import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();
        String[] strArray = S.split("");

        int result = 0;
        boolean breakFlag = false;

        for(String str : strArray) {
            if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            }
        }

        pw.println(result);
        br.close();
        pw.close();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();
        String[] strArray = S.split("");

        int result = 0;
        boolean breakFlag = false;

        for(String str : strArray) {
            if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            }
        }

        pw.println(result);
        br.close();
        pw.close();
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();
        String[] strArray = S.split("");

        int result = 0;
        boolean breakFlag = false;

        for(String str : strArray) {
            if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            }
        }

        pw.println(result);
        br.close();
        pw.close();
    } main {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();
        String[] strArray = S.split("");

        int result = 0;
        boolean breakFlag = false;

        for(String str : strArray) {
            if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            }
        }

        pw.println(result);
        br.close();
        pw.close();
    } BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in)); br new BufferedReader(new java.io.InputStreamReader(System.in)) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) String S = st.nextToken(); S st.nextToken() st.nextToken st String[] strArray = S.split(""); strArray S.split("") S.split S "" int result = 0; result 0 boolean breakFlag = false; breakFlag false for(String str : strArray) {
            if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            }
        } String str strArray {
            if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            }
        } {
            if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            }
        } if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            } "R".equals(str) "R".equals "R" str {
                result++;
                breakFlag = true;
            } result++ result breakFlag = true breakFlag true if(breakFlag) {
                break;
            } breakFlag {
                break;
            } break; pw.println(result) pw.println pw result br.close() br.close br pw.close() pw.close pw String[] args args public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();
        String[] strArray = S.split("");

        int result = 0;
        boolean breakFlag = false;

        for(String str : strArray) {
            if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            }
        }

        pw.println(result);
        br.close();
        pw.close();
    }
} public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();
        String[] strArray = S.split("");

        int result = 0;
        boolean breakFlag = false;

        for(String str : strArray) {
            if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            }
        }

        pw.println(result);
        br.close();
        pw.close();
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();
        String[] strArray = S.split("");

        int result = 0;
        boolean breakFlag = false;

        for(String str : strArray) {
            if ("R".equals(str)) {
                result++;
                breakFlag = true;
            } else if(breakFlag) {
                break;
            }
        }

        pw.println(result);
        br.close();
        pw.close();
    }
}