import java.util.Scanner;

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