import java.util.Scanner;

public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        char[] S = scanner.next().toCharArray();

        // 真面目に書く
        int maxCount = 0;
        for (int i = 0, currentCnt = 0; i < S.length; i++) {
            if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            }
        }

        System.out.println(maxCount);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        char[] S = scanner.next().toCharArray();

        // 真面目に書く
        int maxCount = 0;
        for (int i = 0, currentCnt = 0; i < S.length; i++) {
            if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            }
        }

        System.out.println(maxCount);
    }
} Main public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        char[] S = scanner.next().toCharArray();

        // 真面目に書く
        int maxCount = 0;
        for (int i = 0, currentCnt = 0; i < S.length; i++) {
            if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            }
        }

        System.out.println(maxCount);
    } main {
        Scanner scanner = new Scanner(System.in);

        char[] S = scanner.next().toCharArray();

        // 真面目に書く
        int maxCount = 0;
        for (int i = 0, currentCnt = 0; i < S.length; i++) {
            if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            }
        }

        System.out.println(maxCount);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] S = scanner.next().toCharArray(); S scanner.next().toCharArray() scanner.next().toCharArray scanner.next() scanner.next scanner int maxCount = 0; maxCount 0 for (int i = 0, currentCnt = 0; i < S.length; i++) {
            if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            }
        } int i = 0, currentCnt = 0; int i = 0 i 0 currentCnt = 0; currentCnt 0 i < S.length i S.length S S.length i++ i++ i {
            if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            }
        } {
            if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            }
        } if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            } S[i] == 'R' S[i] S i 'R' {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } currentCnt++ currentCnt if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                } maxCount < currentCnt maxCount currentCnt {
                    maxCount = currentCnt;
                } maxCount = currentCnt maxCount currentCnt {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            } if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                } maxCount < currentCnt maxCount currentCnt {
                    maxCount = currentCnt;
                } maxCount = currentCnt maxCount currentCnt currentCnt = 0 currentCnt 0 System.out.println(maxCount) System.out.println System.out System System.out maxCount String... args args public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        char[] S = scanner.next().toCharArray();

        // 真面目に書く
        int maxCount = 0;
        for (int i = 0, currentCnt = 0; i < S.length; i++) {
            if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            }
        }

        System.out.println(maxCount);
    }
} public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        char[] S = scanner.next().toCharArray();

        // 真面目に書く
        int maxCount = 0;
        for (int i = 0, currentCnt = 0; i < S.length; i++) {
            if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            }
        }

        System.out.println(maxCount);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String... args) {
        Scanner scanner = new Scanner(System.in);

        char[] S = scanner.next().toCharArray();

        // 真面目に書く
        int maxCount = 0;
        for (int i = 0, currentCnt = 0; i < S.length; i++) {
            if (S[i] == 'R') {
                currentCnt++;

                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
            } else {
                if (maxCount < currentCnt) {
                    maxCount = currentCnt;
                }
                currentCnt = 0;
            }
        }

        System.out.println(maxCount);
    }
}
