import java.util.*;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        char[] s = scanner.next().toCharArray();
        int ans = 0;
        int count = 0;
        for (char c : s) {
            if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        System.out.println(Math.max(count, ans));
    }

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

    public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        char[] s = scanner.next().toCharArray();
        int ans = 0;
        int count = 0;
        for (char c : s) {
            if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        System.out.println(Math.max(count, ans));
    }

} Main public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        char[] s = scanner.next().toCharArray();
        int ans = 0;
        int count = 0;
        for (char c : s) {
            if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        System.out.println(Math.max(count, ans));
    } main {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        char[] s = scanner.next().toCharArray();
        int ans = 0;
        int count = 0;
        for (char c : s) {
            if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        System.out.println(Math.max(count, ans));
    } 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 ans = 0; ans 0 int count = 0; count 0 for (char c : s) {
            if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        } char c s {
            if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        } {
            if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        } if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            } c == 'R' c 'R' {
                count++;
            } count++ count {
                ans = Math.max(ans, count);
                count = 0;
            } ans = Math.max(ans, count) ans Math.max(ans, count) Math.max Math ans count count = 0 count 0 System.out.println(Math.max(count, ans)) System.out.println System.out System System.out Math.max(count, ans) Math.max Math count ans String[] args args public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        char[] s = scanner.next().toCharArray();
        int ans = 0;
        int count = 0;
        for (char c : s) {
            if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        System.out.println(Math.max(count, ans));
    }

} public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        char[] s = scanner.next().toCharArray();
        int ans = 0;
        int count = 0;
        for (char c : s) {
            if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        System.out.println(Math.max(count, ans));
    }

} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        char[] s = scanner.next().toCharArray();
        int ans = 0;
        int count = 0;
        for (char c : s) {
            if (c == 'R') {
                count++;
            } else {
                ans = Math.max(ans, count);
                count = 0;
            }
        }
        System.out.println(Math.max(count, ans));
    }

}