import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int result = 0;

        switch(str){
            case "RRR":
                result = 3;
                break;
            case "RRS":
                result = 2;
                break;
            case "SRR":
                result = 2;
                break;
            case "SSS":
                result = 0;
                break;
            default:
                result = 1;
                break;
        }
        System.out.println(result);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int result = 0;

        switch(str){
            case "RRR":
                result = 3;
                break;
            case "RRS":
                result = 2;
                break;
            case "SRR":
                result = 2;
                break;
            case "SSS":
                result = 0;
                break;
            default:
                result = 1;
                break;
        }
        System.out.println(result);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int result = 0;

        switch(str){
            case "RRR":
                result = 3;
                break;
            case "RRS":
                result = 2;
                break;
            case "SRR":
                result = 2;
                break;
            case "SSS":
                result = 0;
                break;
            default:
                result = 1;
                break;
        }
        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int result = 0;

        switch(str){
            case "RRR":
                result = 3;
                break;
            case "RRS":
                result = 2;
                break;
            case "SRR":
                result = 2;
                break;
            case "SSS":
                result = 0;
                break;
            default:
                result = 1;
                break;
        }
        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int result = 0; result 0 switch(str){
            case "RRR":
                result = 3;
                break;
            case "RRS":
                result = 2;
                break;
            case "SRR":
                result = 2;
                break;
            case "SSS":
                result = 0;
                break;
            default:
                result = 1;
                break;
        } str case "RRR": "RRR" case "RRR": result = 3 result 3 break; case "RRS": "RRS" case "RRS": result = 2 result 2 break; case "SRR": "SRR" case "SRR": result = 2 result 2 break; case "SSS": "SSS" case "SSS": result = 0 result 0 break; default: default: result = 1 result 1 break; System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int result = 0;

        switch(str){
            case "RRR":
                result = 3;
                break;
            case "RRS":
                result = 2;
                break;
            case "SRR":
                result = 2;
                break;
            case "SSS":
                result = 0;
                break;
            default:
                result = 1;
                break;
        }
        System.out.println(result);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int result = 0;

        switch(str){
            case "RRR":
                result = 3;
                break;
            case "RRS":
                result = 2;
                break;
            case "SRR":
                result = 2;
                break;
            case "SSS":
                result = 0;
                break;
            default:
                result = 1;
                break;
        }
        System.out.println(result);
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int result = 0;

        switch(str){
            case "RRR":
                result = 3;
                break;
            case "RRS":
                result = 2;
                break;
            case "SRR":
                result = 2;
                break;
            case "SSS":
                result = 0;
                break;
            default:
                result = 1;
                break;
        }
        System.out.println(result);
    }
}