import java.util.Scanner;

public class Main {

    public static int findMaxConsecutiveDays(String weatherString){
        int maxDays =0;

        char[] weatherChar = weatherString.toCharArray();
//        for(char character:weatherChar){
//            System.out.println(character);
//        }

        int temporaryCount = 0;
        for(int i =0 ;i<weatherChar.length;i++){
            if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            }
        }
        if(temporaryCount>maxDays) {
            maxDays = temporaryCount;
        }
        return maxDays;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        System.out.println(findMaxConsecutiveDays(str));
        scanner.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static int findMaxConsecutiveDays(String weatherString){
        int maxDays =0;

        char[] weatherChar = weatherString.toCharArray();
//        for(char character:weatherChar){
//            System.out.println(character);
//        }

        int temporaryCount = 0;
        for(int i =0 ;i<weatherChar.length;i++){
            if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            }
        }
        if(temporaryCount>maxDays) {
            maxDays = temporaryCount;
        }
        return maxDays;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        System.out.println(findMaxConsecutiveDays(str));
        scanner.close();
    }
} Main public static int findMaxConsecutiveDays(String weatherString){
        int maxDays =0;

        char[] weatherChar = weatherString.toCharArray();
//        for(char character:weatherChar){
//            System.out.println(character);
//        }

        int temporaryCount = 0;
        for(int i =0 ;i<weatherChar.length;i++){
            if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            }
        }
        if(temporaryCount>maxDays) {
            maxDays = temporaryCount;
        }
        return maxDays;
    } findMaxConsecutiveDays {
        int maxDays =0;

        char[] weatherChar = weatherString.toCharArray();
//        for(char character:weatherChar){
//            System.out.println(character);
//        }

        int temporaryCount = 0;
        for(int i =0 ;i<weatherChar.length;i++){
            if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            }
        }
        if(temporaryCount>maxDays) {
            maxDays = temporaryCount;
        }
        return maxDays;
    } int maxDays =0; maxDays 0 char[] weatherChar = weatherString.toCharArray(); weatherChar weatherString.toCharArray() weatherString.toCharArray weatherString int temporaryCount = 0; temporaryCount 0 for(int i =0 ;i<weatherChar.length;i++){
            if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            }
        } int i =0 ; int i =0 ; i 0 i<weatherChar.length i weatherChar.length weatherChar weatherChar.length i++ i++ i {
            if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            }
        } {
            if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            }
        } if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            } weatherChar[i] == 'R' weatherChar[i] weatherChar i 'R' {
                temporaryCount++;
            } temporaryCount++ temporaryCount {
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            } if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                } temporaryCount>maxDays temporaryCount maxDays {
                    maxDays = temporaryCount;
                } maxDays = temporaryCount maxDays temporaryCount temporaryCount =0 temporaryCount 0 if(temporaryCount>maxDays) {
            maxDays = temporaryCount;
        } temporaryCount>maxDays temporaryCount maxDays {
            maxDays = temporaryCount;
        } maxDays = temporaryCount maxDays temporaryCount return maxDays; maxDays String weatherString weatherString public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        System.out.println(findMaxConsecutiveDays(str));
        scanner.close();
    } main {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        System.out.println(findMaxConsecutiveDays(str));
        scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String str = scanner.next(); str scanner.next() scanner.next scanner System.out.println(findMaxConsecutiveDays(str)) System.out.println System.out System System.out findMaxConsecutiveDays(str) findMaxConsecutiveDays str scanner.close() scanner.close scanner String[] args args public class Main {

    public static int findMaxConsecutiveDays(String weatherString){
        int maxDays =0;

        char[] weatherChar = weatherString.toCharArray();
//        for(char character:weatherChar){
//            System.out.println(character);
//        }

        int temporaryCount = 0;
        for(int i =0 ;i<weatherChar.length;i++){
            if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            }
        }
        if(temporaryCount>maxDays) {
            maxDays = temporaryCount;
        }
        return maxDays;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        System.out.println(findMaxConsecutiveDays(str));
        scanner.close();
    }
} public class Main {

    public static int findMaxConsecutiveDays(String weatherString){
        int maxDays =0;

        char[] weatherChar = weatherString.toCharArray();
//        for(char character:weatherChar){
//            System.out.println(character);
//        }

        int temporaryCount = 0;
        for(int i =0 ;i<weatherChar.length;i++){
            if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            }
        }
        if(temporaryCount>maxDays) {
            maxDays = temporaryCount;
        }
        return maxDays;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        System.out.println(findMaxConsecutiveDays(str));
        scanner.close();
    }
} Main
import java.util.Scanner;

public class Main {

    public static int findMaxConsecutiveDays(String weatherString){
        int maxDays =0;

        char[] weatherChar = weatherString.toCharArray();
//        for(char character:weatherChar){
//            System.out.println(character);
//        }

        int temporaryCount = 0;
        for(int i =0 ;i<weatherChar.length;i++){
            if(weatherChar[i] == 'R'){
                temporaryCount++;
            }else{
                if(temporaryCount>maxDays) {
                    maxDays = temporaryCount;
                }
                temporaryCount =0;
            }
        }
        if(temporaryCount>maxDays) {
            maxDays = temporaryCount;
        }
        return maxDays;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        System.out.println(findMaxConsecutiveDays(str));
        scanner.close();
    }
}