import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        Solver solverObj = new Solver();
        System.out.println(solverObj.solve(s));
    }
}

class Solver {
    public int solve(String s){
        int max = 0;

        int left = 0;
        for(int i=0;i<s.length();i++){
             char c = s.charAt(i);
             if(c == 'R'){
                 max = Math.max(max, i - left + 1);
             } else {
                 left = i + 1;
             }
        }
        return max;
    }
} 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();
        Solver solverObj = new Solver();
        System.out.println(solverObj.solve(s));
    }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        Solver solverObj = new Solver();
        System.out.println(solverObj.solve(s));
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        Solver solverObj = new Solver();
        System.out.println(solverObj.solve(s));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc Solver solverObj = new Solver(); solverObj new Solver() System.out.println(solverObj.solve(s)) System.out.println System.out System System.out solverObj.solve(s) solverObj.solve solverObj s String args[] args class Solver {
    public int solve(String s){
        int max = 0;

        int left = 0;
        for(int i=0;i<s.length();i++){
             char c = s.charAt(i);
             if(c == 'R'){
                 max = Math.max(max, i - left + 1);
             } else {
                 left = i + 1;
             }
        }
        return max;
    }
} Solver public int solve(String s){
        int max = 0;

        int left = 0;
        for(int i=0;i<s.length();i++){
             char c = s.charAt(i);
             if(c == 'R'){
                 max = Math.max(max, i - left + 1);
             } else {
                 left = i + 1;
             }
        }
        return max;
    } solve {
        int max = 0;

        int left = 0;
        for(int i=0;i<s.length();i++){
             char c = s.charAt(i);
             if(c == 'R'){
                 max = Math.max(max, i - left + 1);
             } else {
                 left = i + 1;
             }
        }
        return max;
    } int max = 0; max 0 int left = 0; left 0 for(int i=0;i<s.length();i++){
             char c = s.charAt(i);
             if(c == 'R'){
                 max = Math.max(max, i - left + 1);
             } else {
                 left = i + 1;
             }
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
             char c = s.charAt(i);
             if(c == 'R'){
                 max = Math.max(max, i - left + 1);
             } else {
                 left = i + 1;
             }
        } {
             char c = s.charAt(i);
             if(c == 'R'){
                 max = Math.max(max, i - left + 1);
             } else {
                 left = i + 1;
             }
        } char c = s.charAt(i); c s.charAt(i) s.charAt s i if(c == 'R'){
                 max = Math.max(max, i - left + 1);
             } else {
                 left = i + 1;
             } c == 'R' c 'R' {
                 max = Math.max(max, i - left + 1);
             } max = Math.max(max, i - left + 1) max Math.max(max, i - left + 1) Math.max Math max i - left + 1 i - left i left 1 {
                 left = i + 1;
             } left = i + 1 left i + 1 i 1 return max; max String s s public class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        Solver solverObj = new Solver();
        System.out.println(solverObj.solve(s));
    }
} public class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        Solver solverObj = new Solver();
        System.out.println(solverObj.solve(s));
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        Solver solverObj = new Solver();
        System.out.println(solverObj.solve(s));
    }
}

class Solver {
    public int solve(String s){
        int max = 0;

        int left = 0;
        for(int i=0;i<s.length();i++){
             char c = s.charAt(i);
             if(c == 'R'){
                 max = Math.max(max, i - left + 1);
             } else {
                 left = i + 1;
             }
        }
        return max;
    }
}
