import java.util.*;

class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        char[] arr = s.toCharArray();
        int max;
        int c;
        c = max = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == 'R') {
                c = c + 1;
            } else {
                c = 0;
            }
            if (c > max) {
                max = c;
            }
        }
        System.out.println(max);
    }
} import java.util.*; util.* java class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        char[] arr = s.toCharArray();
        int max;
        int c;
        c = max = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == 'R') {
                c = c + 1;
            } else {
                c = 0;
            }
            if (c > max) {
                max = c;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        char[] arr = s.toCharArray();
        int max;
        int c;
        c = max = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == 'R') {
                c = c + 1;
            } else {
                c = 0;
            }
            if (c > max) {
                max = c;
            }
        }
        System.out.println(max);
    } main {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        char[] arr = s.toCharArray();
        int max;
        int c;
        c = max = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == 'R') {
                c = c + 1;
            } else {
                c = 0;
            }
            if (c > max) {
                max = c;
            }
        }
        System.out.println(max);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.nextLine(); s in.nextLine() in.nextLine in char[] arr = s.toCharArray(); arr s.toCharArray() s.toCharArray s int max; max int c; c c = max = 0 c max = 0 max 0 for (int i = 0; i < arr.length; i++) {
            if (arr[i] == 'R') {
                c = c + 1;
            } else {
                c = 0;
            }
            if (c > max) {
                max = c;
            }
        } int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i {
            if (arr[i] == 'R') {
                c = c + 1;
            } else {
                c = 0;
            }
            if (c > max) {
                max = c;
            }
        } {
            if (arr[i] == 'R') {
                c = c + 1;
            } else {
                c = 0;
            }
            if (c > max) {
                max = c;
            }
        } if (arr[i] == 'R') {
                c = c + 1;
            } else {
                c = 0;
            } arr[i] == 'R' arr[i] arr i 'R' {
                c = c + 1;
            } c = c + 1 c c + 1 c 1 {
                c = 0;
            } c = 0 c 0 if (c > max) {
                max = c;
            } c > max c max {
                max = c;
            } max = c max c System.out.println(max) System.out.println System.out System System.out max String[] args args
import java.util.*;

class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        char[] arr = s.toCharArray();
        int max;
        int c;
        c = max = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == 'R') {
                c = c + 1;
            } else {
                c = 0;
            }
            if (c > max) {
                max = c;
            }
        }
        System.out.println(max);
    }
}