import java.util.Scanner;

public class Main {

    public static final int MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
//        int n = Integer.parseInt(sc.next());
        String s = sc.next();
        int max = 0;
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 0;
            }
        }
        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static final int MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
//        int n = Integer.parseInt(sc.next());
        String s = sc.next();
        int max = 0;
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 0;
            }
        }
        System.out.println(max);
    }
} Main public static final int MOD = 1000000007; MOD 1000000007 public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
//        int n = Integer.parseInt(sc.next());
        String s = sc.next();
        int max = 0;
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 0;
            }
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
//        int n = Integer.parseInt(sc.next());
        String s = sc.next();
        int max = 0;
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 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 int max = 0; max 0 int cnt = 0; cnt 0 for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 0;
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 0;
            }
        } {
            if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 0;
            }
        } if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 0;
            } s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } cnt++ cnt if (max < cnt) {
                    max = cnt;
                } max < cnt max cnt {
                    max = cnt;
                } max = cnt max cnt {
                cnt = 0;
            } cnt = 0 cnt 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

    public static final int MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
//        int n = Integer.parseInt(sc.next());
        String s = sc.next();
        int max = 0;
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 0;
            }
        }
        System.out.println(max);
    }
} public class Main {

    public static final int MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
//        int n = Integer.parseInt(sc.next());
        String s = sc.next();
        int max = 0;
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 0;
            }
        }
        System.out.println(max);
    }
} Main
import java.util.Scanner;

public class Main {

    public static final int MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
//        int n = Integer.parseInt(sc.next());
        String s = sc.next();
        int max = 0;
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'R') {
                cnt++;
                if (max < cnt) {
                    max = cnt;
                }
            } else {
                cnt = 0;
            }
        }
        System.out.println(max);
    }
}