import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String w[] = s.split("", -1);
        int cnt = 0;
        for(int i = 0; i < 3; i++){
            if(w[i].equals("R")){
                cnt += 1;
            }
        }

        if(cnt == 3){
            System.out.println("3");
        }else if(cnt == 2 && w[1].equals("R")){
            System.out.println("2");
        }else if(cnt == 0){
            System.out.println("0");
        }else{
            System.out.println("1");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String w[] = s.split("", -1);
        int cnt = 0;
        for(int i = 0; i < 3; i++){
            if(w[i].equals("R")){
                cnt += 1;
            }
        }

        if(cnt == 3){
            System.out.println("3");
        }else if(cnt == 2 && w[1].equals("R")){
            System.out.println("2");
        }else if(cnt == 0){
            System.out.println("0");
        }else{
            System.out.println("1");
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String w[] = s.split("", -1);
        int cnt = 0;
        for(int i = 0; i < 3; i++){
            if(w[i].equals("R")){
                cnt += 1;
            }
        }

        if(cnt == 3){
            System.out.println("3");
        }else if(cnt == 2 && w[1].equals("R")){
            System.out.println("2");
        }else if(cnt == 0){
            System.out.println("0");
        }else{
            System.out.println("1");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String w[] = s.split("", -1);
        int cnt = 0;
        for(int i = 0; i < 3; i++){
            if(w[i].equals("R")){
                cnt += 1;
            }
        }

        if(cnt == 3){
            System.out.println("3");
        }else if(cnt == 2 && w[1].equals("R")){
            System.out.println("2");
        }else if(cnt == 0){
            System.out.println("0");
        }else{
            System.out.println("1");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String w[] = s.split("", -1); w s.split("", -1) s.split s "" -1 1 int cnt = 0; cnt 0 for(int i = 0; i < 3; i++){
            if(w[i].equals("R")){
                cnt += 1;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            if(w[i].equals("R")){
                cnt += 1;
            }
        } {
            if(w[i].equals("R")){
                cnt += 1;
            }
        } if(w[i].equals("R")){
                cnt += 1;
            } w[i].equals("R") w[i].equals w[i] w i "R" {
                cnt += 1;
            } cnt += 1 cnt 1 if(cnt == 3){
            System.out.println("3");
        }else if(cnt == 2 && w[1].equals("R")){
            System.out.println("2");
        }else if(cnt == 0){
            System.out.println("0");
        }else{
            System.out.println("1");
        } cnt == 3 cnt 3 {
            System.out.println("3");
        } System.out.println("3") System.out.println System.out System System.out "3" if(cnt == 2 && w[1].equals("R")){
            System.out.println("2");
        }else if(cnt == 0){
            System.out.println("0");
        }else{
            System.out.println("1");
        } cnt == 2 && w[1].equals("R") cnt == 2 cnt 2 w[1].equals("R") w[1].equals w[1] w 1 "R" {
            System.out.println("2");
        } System.out.println("2") System.out.println System.out System System.out "2" if(cnt == 0){
            System.out.println("0");
        }else{
            System.out.println("1");
        } cnt == 0 cnt 0 {
            System.out.println("0");
        } System.out.println("0") System.out.println System.out System System.out "0" {
            System.out.println("1");
        } System.out.println("1") System.out.println System.out System System.out "1" String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String w[] = s.split("", -1);
        int cnt = 0;
        for(int i = 0; i < 3; i++){
            if(w[i].equals("R")){
                cnt += 1;
            }
        }

        if(cnt == 3){
            System.out.println("3");
        }else if(cnt == 2 && w[1].equals("R")){
            System.out.println("2");
        }else if(cnt == 0){
            System.out.println("0");
        }else{
            System.out.println("1");
        }
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String w[] = s.split("", -1);
        int cnt = 0;
        for(int i = 0; i < 3; i++){
            if(w[i].equals("R")){
                cnt += 1;
            }
        }

        if(cnt == 3){
            System.out.println("3");
        }else if(cnt == 2 && w[1].equals("R")){
            System.out.println("2");
        }else if(cnt == 0){
            System.out.println("0");
        }else{
            System.out.println("1");
        }
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String w[] = s.split("", -1);
        int cnt = 0;
        for(int i = 0; i < 3; i++){
            if(w[i].equals("R")){
                cnt += 1;
            }
        }

        if(cnt == 3){
            System.out.println("3");
        }else if(cnt == 2 && w[1].equals("R")){
            System.out.println("2");
        }else if(cnt == 0){
            System.out.println("0");
        }else{
            System.out.println("1");
        }
    }
}