import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            String s = scanner.next();
            int counter = 0;
            int result = 0;

            for (int i = 0; i < 3; i++) {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            }
            System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            String s = scanner.next();
            int counter = 0;
            int result = 0;

            for (int i = 0; i < 3; i++) {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            }
            System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
} Main public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            String s = scanner.next();
            int counter = 0;
            int result = 0;

            for (int i = 0; i < 3; i++) {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            }
            System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    } main {
        try (Scanner scanner = new Scanner(System.in);) {
            String s = scanner.next();
            int counter = 0;
            int result = 0;

            for (int i = 0; i < 3; i++) {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            }
            System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    } try (Scanner scanner = new Scanner(System.in);) {
            String s = scanner.next();
            int counter = 0;
            int result = 0;

            for (int i = 0; i < 3; i++) {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            }
            System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        } Exception e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            String s = scanner.next();
            int counter = 0;
            int result = 0;

            for (int i = 0; i < 3; i++) {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            }
            System.out.println(result);
        } Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) String s = scanner.next(); s scanner.next() scanner.next scanner int counter = 0; counter 0 int result = 0; result 0 for (int i = 0; i < 3; i++) {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            } {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            } char next = s.charAt(i); next s.charAt(i) s.charAt s i if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                } next == 'R' next 'R' {
                    counter++;
                } counter++ counter {
                    counter = 0;
                } counter = 0 counter 0 result = Math.max(result, counter) result Math.max(result, counter) Math.max Math result counter System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            String s = scanner.next();
            int counter = 0;
            int result = 0;

            for (int i = 0; i < 3; i++) {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            }
            System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            String s = scanner.next();
            int counter = 0;
            int result = 0;

            for (int i = 0; i < 3; i++) {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            }
            System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in);) {
            String s = scanner.next();
            int counter = 0;
            int result = 0;

            for (int i = 0; i < 3; i++) {
                char next = s.charAt(i);
                if (next == 'R') {
                    counter++;
                } else {
                    counter = 0;
                }
                result = Math.max(result, counter);
            }
            System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
