import java.util.*;

public class Main{
    /**
     * メインメソッド
     */
    public static void main(final String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        final int answer = weatherReport(S);
        System.out.println(answer);
    }

    /**
     * ロジック
     */
    public static int weatherReport(String S) {
        if (S.matches("R{3}")){
            return 3;
        } else if (S.matches(".*R{2}.*")) {
            return 2;
        } else if (S.matches(".*R.*")) {
            return 1;
        } else {
            return 0;
        }
    }
} import java.util.*; util.* java public class Main{
    /**
     * メインメソッド
     */
    public static void main(final String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        final int answer = weatherReport(S);
        System.out.println(answer);
    }

    /**
     * ロジック
     */
    public static int weatherReport(String S) {
        if (S.matches("R{3}")){
            return 3;
        } else if (S.matches(".*R{2}.*")) {
            return 2;
        } else if (S.matches(".*R.*")) {
            return 1;
        } else {
            return 0;
        }
    }
} Main /**
     * メインメソッド
     */
    public static void main(final String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        final int answer = weatherReport(S);
        System.out.println(answer);
    } main {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        final int answer = weatherReport(S);
        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final String S = sc.next(); S sc.next() sc.next sc final int answer = weatherReport(S); answer weatherReport(S) weatherReport S System.out.println(answer) System.out.println System.out System System.out answer final String[] args args /**
     * ロジック
     */
    public static int weatherReport(String S) {
        if (S.matches("R{3}")){
            return 3;
        } else if (S.matches(".*R{2}.*")) {
            return 2;
        } else if (S.matches(".*R.*")) {
            return 1;
        } else {
            return 0;
        }
    } weatherReport {
        if (S.matches("R{3}")){
            return 3;
        } else if (S.matches(".*R{2}.*")) {
            return 2;
        } else if (S.matches(".*R.*")) {
            return 1;
        } else {
            return 0;
        }
    } if (S.matches("R{3}")){
            return 3;
        } else if (S.matches(".*R{2}.*")) {
            return 2;
        } else if (S.matches(".*R.*")) {
            return 1;
        } else {
            return 0;
        } S.matches("R{3}") S.matches S "R{3}" {
            return 3;
        } return 3; 3 if (S.matches(".*R{2}.*")) {
            return 2;
        } else if (S.matches(".*R.*")) {
            return 1;
        } else {
            return 0;
        } S.matches(".*R{2}.*") S.matches S ".*R{2}.*" {
            return 2;
        } return 2; 2 if (S.matches(".*R.*")) {
            return 1;
        } else {
            return 0;
        } S.matches(".*R.*") S.matches S ".*R.*" {
            return 1;
        } return 1; 1 {
            return 0;
        } return 0; 0 String S S public class Main{
    /**
     * メインメソッド
     */
    public static void main(final String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        final int answer = weatherReport(S);
        System.out.println(answer);
    }

    /**
     * ロジック
     */
    public static int weatherReport(String S) {
        if (S.matches("R{3}")){
            return 3;
        } else if (S.matches(".*R{2}.*")) {
            return 2;
        } else if (S.matches(".*R.*")) {
            return 1;
        } else {
            return 0;
        }
    }
} public class Main{
    /**
     * メインメソッド
     */
    public static void main(final String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        final int answer = weatherReport(S);
        System.out.println(answer);
    }

    /**
     * ロジック
     */
    public static int weatherReport(String S) {
        if (S.matches("R{3}")){
            return 3;
        } else if (S.matches(".*R{2}.*")) {
            return 2;
        } else if (S.matches(".*R.*")) {
            return 1;
        } else {
            return 0;
        }
    }
} Main
import java.util.*;

public class Main{
    /**
     * メインメソッド
     */
    public static void main(final String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.next();
        final int answer = weatherReport(S);
        System.out.println(answer);
    }

    /**
     * ロジック
     */
    public static int weatherReport(String S) {
        if (S.matches("R{3}")){
            return 3;
        } else if (S.matches(".*R{2}.*")) {
            return 2;
        } else if (S.matches(".*R.*")) {
            return 1;
        } else {
            return 0;
        }
    }
}