
import java.util.Scanner;

public class Main {
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        final String S = sc.next();
        
        int n;
        if ("RRR".equals(S)) {
            n = 3;
        } else if ("RRS".equals(S) || "SRR".equals(S)) {
            n = 2;
        } else if (S.contains("R")) {
            n = 1;
        } else {
            n = 0;
        }
        System.out.println(n);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        final String S = sc.next();
        
        int n;
        if ("RRR".equals(S)) {
            n = 3;
        } else if ("RRS".equals(S) || "SRR".equals(S)) {
            n = 2;
        } else if (S.contains("R")) {
            n = 1;
        } else {
            n = 0;
        }
        System.out.println(n);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        final String S = sc.next();
        
        int n;
        if ("RRR".equals(S)) {
            n = 3;
        } else if ("RRS".equals(S) || "SRR".equals(S)) {
            n = 2;
        } else if (S.contains("R")) {
            n = 1;
        } else {
            n = 0;
        }
        System.out.println(n);
    } main {
        Scanner sc = new Scanner(System.in);
        
        final String S = sc.next();
        
        int n;
        if ("RRR".equals(S)) {
            n = 3;
        } else if ("RRS".equals(S) || "SRR".equals(S)) {
            n = 2;
        } else if (S.contains("R")) {
            n = 1;
        } else {
            n = 0;
        }
        System.out.println(n);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final String S = sc.next(); S sc.next() sc.next sc int n; n if ("RRR".equals(S)) {
            n = 3;
        } else if ("RRS".equals(S) || "SRR".equals(S)) {
            n = 2;
        } else if (S.contains("R")) {
            n = 1;
        } else {
            n = 0;
        } "RRR".equals(S) "RRR".equals "RRR" S {
            n = 3;
        } n = 3 n 3 if ("RRS".equals(S) || "SRR".equals(S)) {
            n = 2;
        } else if (S.contains("R")) {
            n = 1;
        } else {
            n = 0;
        } "RRS".equals(S) || "SRR".equals(S) "RRS".equals(S) "RRS".equals "RRS" S "SRR".equals(S) "SRR".equals "SRR" S {
            n = 2;
        } n = 2 n 2 if (S.contains("R")) {
            n = 1;
        } else {
            n = 0;
        } S.contains("R") S.contains S "R" {
            n = 1;
        } n = 1 n 1 {
            n = 0;
        } n = 0 n 0 System.out.println(n) System.out.println System.out System System.out n String[] args args public class Main {
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        final String S = sc.next();
        
        int n;
        if ("RRR".equals(S)) {
            n = 3;
        } else if ("RRS".equals(S) || "SRR".equals(S)) {
            n = 2;
        } else if (S.contains("R")) {
            n = 1;
        } else {
            n = 0;
        }
        System.out.println(n);
    }
} public class Main {
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        final String S = sc.next();
        
        int n;
        if ("RRR".equals(S)) {
            n = 3;
        } else if ("RRS".equals(S) || "SRR".equals(S)) {
            n = 2;
        } else if (S.contains("R")) {
            n = 1;
        } else {
            n = 0;
        }
        System.out.println(n);
    }
} Main

import java.util.Scanner;

public class Main {
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        final String S = sc.next();
        
        int n;
        if ("RRR".equals(S)) {
            n = 3;
        } else if ("RRS".equals(S) || "SRR".equals(S)) {
            n = 2;
        } else if (S.contains("R")) {
            n = 1;
        } else {
            n = 0;
        }
        System.out.println(n);
    }
}
