
import java.util.Scanner;

public class Main {


    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {

            String str = scanner.nextLine();
            int res = 0;
            int count = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            }
            System.out.println(res);
        }
    }

} import java.util.Scanner; Scanner java.util public class Main {


    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {

            String str = scanner.nextLine();
            int res = 0;
            int count = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            }
            System.out.println(res);
        }
    }

} Main public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {

            String str = scanner.nextLine();
            int res = 0;
            int count = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            }
            System.out.println(res);
        }
    } main {

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {

            String str = scanner.nextLine();
            int res = 0;
            int count = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            }
            System.out.println(res);
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while (scanner.hasNext()) {

            String str = scanner.nextLine();
            int res = 0;
            int count = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            }
            System.out.println(res);
        } scanner.hasNext() scanner.hasNext scanner {

            String str = scanner.nextLine();
            int res = 0;
            int count = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            }
            System.out.println(res);
        } String str = scanner.nextLine(); str scanner.nextLine() scanner.nextLine scanner int res = 0; res 0 int count = 0; count 0 for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            } {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            } if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                } str.charAt(i) == 'R' str.charAt(i) str.charAt str i 'R' {
                    count++;
                } count++ count {
                    count = 0;
                } count = 0 count 0 res = Math.max(res, count) res Math.max(res, count) Math.max Math res count System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {


    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {

            String str = scanner.nextLine();
            int res = 0;
            int count = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            }
            System.out.println(res);
        }
    }

} public class Main {


    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {

            String str = scanner.nextLine();
            int res = 0;
            int count = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            }
            System.out.println(res);
        }
    }

} Main

import java.util.Scanner;

public class Main {


    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {

            String str = scanner.nextLine();
            int res = 0;
            int count = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == 'R') {
                    count++;
                } else {
                    count = 0;
                }
                res = Math.max(res, count);
            }
            System.out.println(res);
        }
    }

}
