import java.util.Scanner;


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

        String str = sc.next();
        int count = -1;

        if(str.matches(".*R{3}.*")){
            count = 3;
        }
        else if(str.matches(".*R{2}.*")){
            count = 2;
        }
        else if(str.matches(".*R{1}.*")){
            count = 1;
        }
        else{
            count = 0;
        }
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String str = sc.next();
        int count = -1;

        if(str.matches(".*R{3}.*")){
            count = 3;
        }
        else if(str.matches(".*R{2}.*")){
            count = 2;
        }
        else if(str.matches(".*R{1}.*")){
            count = 1;
        }
        else{
            count = 0;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String str = sc.next();
        int count = -1;

        if(str.matches(".*R{3}.*")){
            count = 3;
        }
        else if(str.matches(".*R{2}.*")){
            count = 2;
        }
        else if(str.matches(".*R{1}.*")){
            count = 1;
        }
        else{
            count = 0;
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);

        String str = sc.next();
        int count = -1;

        if(str.matches(".*R{3}.*")){
            count = 3;
        }
        else if(str.matches(".*R{2}.*")){
            count = 2;
        }
        else if(str.matches(".*R{1}.*")){
            count = 1;
        }
        else{
            count = 0;
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int count = -1; count -1 1 if(str.matches(".*R{3}.*")){
            count = 3;
        }
        else if(str.matches(".*R{2}.*")){
            count = 2;
        }
        else if(str.matches(".*R{1}.*")){
            count = 1;
        }
        else{
            count = 0;
        } str.matches(".*R{3}.*") str.matches str ".*R{3}.*" {
            count = 3;
        } count = 3 count 3 if(str.matches(".*R{2}.*")){
            count = 2;
        }
        else if(str.matches(".*R{1}.*")){
            count = 1;
        }
        else{
            count = 0;
        } str.matches(".*R{2}.*") str.matches str ".*R{2}.*" {
            count = 2;
        } count = 2 count 2 if(str.matches(".*R{1}.*")){
            count = 1;
        }
        else{
            count = 0;
        } str.matches(".*R{1}.*") str.matches str ".*R{1}.*" {
            count = 1;
        } count = 1 count 1 {
            count = 0;
        } count = 0 count 0 System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String str = sc.next();
        int count = -1;

        if(str.matches(".*R{3}.*")){
            count = 3;
        }
        else if(str.matches(".*R{2}.*")){
            count = 2;
        }
        else if(str.matches(".*R{1}.*")){
            count = 1;
        }
        else{
            count = 0;
        }
        System.out.println(count);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String str = sc.next();
        int count = -1;

        if(str.matches(".*R{3}.*")){
            count = 3;
        }
        else if(str.matches(".*R{2}.*")){
            count = 2;
        }
        else if(str.matches(".*R{1}.*")){
            count = 1;
        }
        else{
            count = 0;
        }
        System.out.println(count);
    }
} Main
import java.util.Scanner;


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

        String str = sc.next();
        int count = -1;

        if(str.matches(".*R{3}.*")){
            count = 3;
        }
        else if(str.matches(".*R{2}.*")){
            count = 2;
        }
        else if(str.matches(".*R{1}.*")){
            count = 1;
        }
        else{
            count = 0;
        }
        System.out.println(count);
    }
}