import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int countRain = 0;
        String[] weather = sc.next().split("");
        boolean yesterdayIsRain = false;
        sc.close();

        for (String we : weather) {
            if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            }
        }
        System.out.println(countRain);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int countRain = 0;
        String[] weather = sc.next().split("");
        boolean yesterdayIsRain = false;
        sc.close();

        for (String we : weather) {
            if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            }
        }
        System.out.println(countRain);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int countRain = 0;
        String[] weather = sc.next().split("");
        boolean yesterdayIsRain = false;
        sc.close();

        for (String we : weather) {
            if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            }
        }
        System.out.println(countRain);
    } main {
        Scanner sc = new Scanner(System.in);
        int countRain = 0;
        String[] weather = sc.next().split("");
        boolean yesterdayIsRain = false;
        sc.close();

        for (String we : weather) {
            if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            }
        }
        System.out.println(countRain);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int countRain = 0; countRain 0 String[] weather = sc.next().split(""); weather sc.next().split("") sc.next().split sc.next() sc.next sc "" boolean yesterdayIsRain = false; yesterdayIsRain false sc.close() sc.close sc for (String we : weather) {
            if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            }
        } String we weather {
            if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            }
        } {
            if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            }
        } if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            } "R".equals(we) "R".equals "R" we {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                } yesterdayIsRain {
                    countRain++;

                } countRain++ countRain {
                    countRain = 1;
                } countRain = 1 countRain 1 yesterdayIsRain = true yesterdayIsRain true {
                yesterdayIsRain = false;
            } yesterdayIsRain = false yesterdayIsRain false System.out.println(countRain) System.out.println System.out System System.out countRain String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int countRain = 0;
        String[] weather = sc.next().split("");
        boolean yesterdayIsRain = false;
        sc.close();

        for (String we : weather) {
            if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            }
        }
        System.out.println(countRain);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int countRain = 0;
        String[] weather = sc.next().split("");
        boolean yesterdayIsRain = false;
        sc.close();

        for (String we : weather) {
            if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            }
        }
        System.out.println(countRain);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int countRain = 0;
        String[] weather = sc.next().split("");
        boolean yesterdayIsRain = false;
        sc.close();

        for (String we : weather) {
            if ("R".equals(we)) {
                if (yesterdayIsRain) {
                    countRain++;

                } else {
                    countRain = 1;
                }
                yesterdayIsRain = true;
            } else {
                yesterdayIsRain = false;
            }
        }
        System.out.println(countRain);
    }
}