import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean rainflg = false;
        int answer = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            }
        }
        System.out.println(answer);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean rainflg = false;
        int answer = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            }
        }
        System.out.println(answer);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean rainflg = false;
        int answer = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            }
        }
        System.out.println(answer);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean rainflg = false;
        int answer = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            }
        }
        System.out.println(answer);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc boolean rainflg = false; rainflg false int answer = 0; answer 0 for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            }
        } {
            if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            }
        } if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            } s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' {
                answer++;
                rainflg = true;
            } answer++ answer rainflg = true rainflg true {
                if (rainflg) {
                    break;
                }
            } if (rainflg) {
                    break;
                } rainflg {
                    break;
                } break; System.out.println(answer) System.out.println System.out System System.out answer sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean rainflg = false;
        int answer = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            }
        }
        System.out.println(answer);
        sc.close();
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean rainflg = false;
        int answer = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            }
        }
        System.out.println(answer);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean rainflg = false;
        int answer = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                answer++;
                rainflg = true;
            } else {
                if (rainflg) {
                    break;
                }
            }
        }
        System.out.println(answer);
        sc.close();
    }
}