import java.util.Scanner;

public class Main {
    public static Scanner Scan = new Scanner(System.in);
    public static void main(String[] args) {
        String s;
        s = Scan.next();

        int cnt = 0, ans = 0;
        for(int i=0; i<s.length(); i++) {
            if(s.charAt(i) == 'R') cnt++;
            else cnt = 0;
            ans = Math.max(ans, cnt);
        }

        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static Scanner Scan = new Scanner(System.in);
    public static void main(String[] args) {
        String s;
        s = Scan.next();

        int cnt = 0, ans = 0;
        for(int i=0; i<s.length(); i++) {
            if(s.charAt(i) == 'R') cnt++;
            else cnt = 0;
            ans = Math.max(ans, cnt);
        }

        System.out.println(ans);
    }
} Main public static Scanner Scan = new Scanner(System.in); Scan new Scanner(System.in) public static void main(String[] args) {
        String s;
        s = Scan.next();

        int cnt = 0, ans = 0;
        for(int i=0; i<s.length(); i++) {
            if(s.charAt(i) == 'R') cnt++;
            else cnt = 0;
            ans = Math.max(ans, cnt);
        }

        System.out.println(ans);
    } main {
        String s;
        s = Scan.next();

        int cnt = 0, ans = 0;
        for(int i=0; i<s.length(); i++) {
            if(s.charAt(i) == 'R') cnt++;
            else cnt = 0;
            ans = Math.max(ans, cnt);
        }

        System.out.println(ans);
    } String s; s s = Scan.next() s Scan.next() Scan.next Scan int cnt = 0 cnt 0 ans = 0; ans 0 for(int i=0; i<s.length(); i++) {
            if(s.charAt(i) == 'R') cnt++;
            else cnt = 0;
            ans = Math.max(ans, cnt);
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            if(s.charAt(i) == 'R') cnt++;
            else cnt = 0;
            ans = Math.max(ans, cnt);
        } {
            if(s.charAt(i) == 'R') cnt++;
            else cnt = 0;
            ans = Math.max(ans, cnt);
        } if(s.charAt(i) == 'R') cnt++;
            else cnt = 0; s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' cnt++ cnt cnt = 0 cnt 0 ans = Math.max(ans, cnt) ans Math.max(ans, cnt) Math.max Math ans cnt System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static Scanner Scan = new Scanner(System.in);
    public static void main(String[] args) {
        String s;
        s = Scan.next();

        int cnt = 0, ans = 0;
        for(int i=0; i<s.length(); i++) {
            if(s.charAt(i) == 'R') cnt++;
            else cnt = 0;
            ans = Math.max(ans, cnt);
        }

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

        int cnt = 0, ans = 0;
        for(int i=0; i<s.length(); i++) {
            if(s.charAt(i) == 'R') cnt++;
            else cnt = 0;
            ans = Math.max(ans, cnt);
        }

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

public class Main {
    public static Scanner Scan = new Scanner(System.in);
    public static void main(String[] args) {
        String s;
        s = Scan.next();

        int cnt = 0, ans = 0;
        for(int i=0; i<s.length(); i++) {
            if(s.charAt(i) == 'R') cnt++;
            else cnt = 0;
            ans = Math.max(ans, cnt);
        }

        System.out.println(ans);
    }
}