import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String text = sc.next();
        int numR = 0;
        int maxR = 0;
        for (int i = 0; i < text.length(); i++){
            if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            }

            if (numR >= maxR){
                maxR = numR;
            }
        }
        System.out.println(maxR);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String text = sc.next();
        int numR = 0;
        int maxR = 0;
        for (int i = 0; i < text.length(); i++){
            if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            }

            if (numR >= maxR){
                maxR = numR;
            }
        }
        System.out.println(maxR);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String text = sc.next();
        int numR = 0;
        int maxR = 0;
        for (int i = 0; i < text.length(); i++){
            if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            }

            if (numR >= maxR){
                maxR = numR;
            }
        }
        System.out.println(maxR);
    } main {
        Scanner sc = new Scanner(System.in);
        String text = sc.next();
        int numR = 0;
        int maxR = 0;
        for (int i = 0; i < text.length(); i++){
            if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            }

            if (numR >= maxR){
                maxR = numR;
            }
        }
        System.out.println(maxR);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String text = sc.next(); text sc.next() sc.next sc int numR = 0; numR 0 int maxR = 0; maxR 0 for (int i = 0; i < text.length(); i++){
            if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            }

            if (numR >= maxR){
                maxR = numR;
            }
        } int i = 0; int i = 0; i 0 i < text.length() i text.length() text.length text i++ i++ i {
            if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            }

            if (numR >= maxR){
                maxR = numR;
            }
        } {
            if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            }

            if (numR >= maxR){
                maxR = numR;
            }
        } if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            } text.charAt(i) == 'R' text.charAt(i) text.charAt text i 'R' {
                numR++;
            } numR++ numR {
                numR = 0;
            } numR = 0 numR 0 if (numR >= maxR){
                maxR = numR;
            } numR >= maxR numR maxR {
                maxR = numR;
            } maxR = numR maxR numR System.out.println(maxR) System.out.println System.out System System.out maxR String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String text = sc.next();
        int numR = 0;
        int maxR = 0;
        for (int i = 0; i < text.length(); i++){
            if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            }

            if (numR >= maxR){
                maxR = numR;
            }
        }
        System.out.println(maxR);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String text = sc.next();
        int numR = 0;
        int maxR = 0;
        for (int i = 0; i < text.length(); i++){
            if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            }

            if (numR >= maxR){
                maxR = numR;
            }
        }
        System.out.println(maxR);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String text = sc.next();
        int numR = 0;
        int maxR = 0;
        for (int i = 0; i < text.length(); i++){
            if (text.charAt(i) == 'R'){
                numR++;
            } else {
                numR = 0;
            }

            if (numR >= maxR){
                maxR = numR;
            }
        }
        System.out.println(maxR);
    }
}