import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int count = 0, max = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            }
        }
        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int count = 0, max = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int count = 0, max = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            }
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int count = 0, max = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            }
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc int count = 0 count 0 max = 0; max 0 for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            }
        } {
            if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            }
        } if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            } s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' {
                count++;
                if (max < count) {
                    max = count;
                }
            } count++ count if (max < count) {
                    max = count;
                } max < count max count {
                    max = count;
                } max = count max count {
                if (max < count) {
                    max = count;
                }
                count = 0;
            } if (max < count) {
                    max = count;
                } max < count max count {
                    max = count;
                } max = count max count count = 0 count 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int count = 0, max = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            }
        }
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int count = 0, max = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            }
        }
        System.out.println(max);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int count = 0, max = 0;
        for (int i = 0; i < 3; i++) {
            if (s.charAt(i) == 'R') {
                count++;
                if (max < count) {
                    max = count;
                }
            } else {
                if (max < count) {
                    max = count;
                }
                count = 0;
            }
        }
        System.out.println(max);
    }
}
