import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String S = sc.next();
            int max = 0;
            int count = 0;
            for (int i = 0; i < S.length(); i++) {
                if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                }
            }
            max = Math.max(max, count);
            System.out.println(max);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String S = sc.next();
            int max = 0;
            int count = 0;
            for (int i = 0; i < S.length(); i++) {
                if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                }
            }
            max = Math.max(max, count);
            System.out.println(max);
        }
    }
} Main public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String S = sc.next();
            int max = 0;
            int count = 0;
            for (int i = 0; i < S.length(); i++) {
                if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                }
            }
            max = Math.max(max, count);
            System.out.println(max);
        }
    } main {
        try (Scanner sc = new Scanner(System.in)) {
            String S = sc.next();
            int max = 0;
            int count = 0;
            for (int i = 0; i < S.length(); i++) {
                if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                }
            }
            max = Math.max(max, count);
            System.out.println(max);
        }
    } try (Scanner sc = new Scanner(System.in)) {
            String S = sc.next();
            int max = 0;
            int count = 0;
            for (int i = 0; i < S.length(); i++) {
                if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                }
            }
            max = Math.max(max, count);
            System.out.println(max);
        } {
            String S = sc.next();
            int max = 0;
            int count = 0;
            for (int i = 0; i < S.length(); i++) {
                if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                }
            }
            max = Math.max(max, count);
            System.out.println(max);
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int max = 0; max 0 int count = 0; count 0 for (int i = 0; i < S.length(); i++) {
                if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 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') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                }
            } {
                if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                }
            } if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                } S.charAt(i) == 'R' S.charAt(i) S.charAt S i 'R' {
                    count++;
                } count++ count {
                    max = Math.max(max, count);
                    count = 0;
                } max = Math.max(max, count) max Math.max(max, count) Math.max Math max count count = 0 count 0 max = Math.max(max, count) max Math.max(max, count) Math.max Math max count 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) {
        try (Scanner sc = new Scanner(System.in)) {
            String S = sc.next();
            int max = 0;
            int count = 0;
            for (int i = 0; i < S.length(); i++) {
                if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                }
            }
            max = Math.max(max, count);
            System.out.println(max);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String S = sc.next();
            int max = 0;
            int count = 0;
            for (int i = 0; i < S.length(); i++) {
                if (S.charAt(i) == 'R') {
                    count++;
                } else {
                    max = Math.max(max, count);
                    count = 0;
                }
            }
            max = Math.max(max, count);
            System.out.println(max);
        }
    }
} Main
import java.util.Scanner;

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