import java.util.*;
import java.io.*;

class Main
{
    public static void main(String[] args) throws IOException{
        PrintWriter out = new PrintWriter(System.out);

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // StringTokenizer st = new StringTokenizer(br.readLine());

        String S = br.readLine();
        int ans = 0;
        if (S.equals("RRS") || S.equals("SRR")) {
            ans = 2;
        }
        else if(S.equals("RRR"))
            ans = 3;
        else if(S.contains("R"))
            ans = 1;

        out.println(ans);
        

        
        out.close();
    }

    

} import java.util.*; util.* java import java.io.*; io.* java class Main
{
    public static void main(String[] args) throws IOException{
        PrintWriter out = new PrintWriter(System.out);

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // StringTokenizer st = new StringTokenizer(br.readLine());

        String S = br.readLine();
        int ans = 0;
        if (S.equals("RRS") || S.equals("SRR")) {
            ans = 2;
        }
        else if(S.equals("RRR"))
            ans = 3;
        else if(S.contains("R"))
            ans = 1;

        out.println(ans);
        

        
        out.close();
    }

    

} Main public static void main(String[] args) throws IOException{
        PrintWriter out = new PrintWriter(System.out);

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // StringTokenizer st = new StringTokenizer(br.readLine());

        String S = br.readLine();
        int ans = 0;
        if (S.equals("RRS") || S.equals("SRR")) {
            ans = 2;
        }
        else if(S.equals("RRR"))
            ans = 3;
        else if(S.contains("R"))
            ans = 1;

        out.println(ans);
        

        
        out.close();
    } main {
        PrintWriter out = new PrintWriter(System.out);

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // StringTokenizer st = new StringTokenizer(br.readLine());

        String S = br.readLine();
        int ans = 0;
        if (S.equals("RRS") || S.equals("SRR")) {
            ans = 2;
        }
        else if(S.equals("RRR"))
            ans = 3;
        else if(S.contains("R"))
            ans = 1;

        out.println(ans);
        

        
        out.close();
    } PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String S = br.readLine(); S br.readLine() br.readLine br int ans = 0; ans 0 if (S.equals("RRS") || S.equals("SRR")) {
            ans = 2;
        }
        else if(S.equals("RRR"))
            ans = 3;
        else if(S.contains("R"))
            ans = 1; S.equals("RRS") || S.equals("SRR") S.equals("RRS") S.equals S "RRS" S.equals("SRR") S.equals S "SRR" {
            ans = 2;
        } ans = 2 ans 2 if(S.equals("RRR"))
            ans = 3;
        else if(S.contains("R"))
            ans = 1; S.equals("RRR") S.equals S "RRR" ans = 3 ans 3 if(S.contains("R"))
            ans = 1; S.contains("R") S.contains S "R" ans = 1 ans 1 out.println(ans) out.println out ans out.close() out.close out String[] args args
import java.util.*;
import java.io.*;

class Main
{
    public static void main(String[] args) throws IOException{
        PrintWriter out = new PrintWriter(System.out);

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // StringTokenizer st = new StringTokenizer(br.readLine());

        String S = br.readLine();
        int ans = 0;
        if (S.equals("RRS") || S.equals("SRR")) {
            ans = 2;
        }
        else if(S.equals("RRR"))
            ans = 3;
        else if(S.contains("R"))
            ans = 1;

        out.println(ans);
        

        
        out.close();
    }

    

}
