
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
        switch(s){
            case "RSS":
            case "SRS":
            case "SSR":
            case "RSR":
                count = 1;
                break;
            case "RRS":
            case "SRR":
                count = 2;
                break;
            case "RRR":
                count = 3;
                break;
        }
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
        switch(s){
            case "RSS":
            case "SRS":
            case "SSR":
            case "RSR":
                count = 1;
                break;
            case "RRS":
            case "SRR":
                count = 2;
                break;
            case "RRR":
                count = 3;
                break;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
        switch(s){
            case "RSS":
            case "SRS":
            case "SSR":
            case "RSR":
                count = 1;
                break;
            case "RRS":
            case "SRR":
                count = 2;
                break;
            case "RRR":
                count = 3;
                break;
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
        switch(s){
            case "RSS":
            case "SRS":
            case "SSR":
            case "RSR":
                count = 1;
                break;
            case "RRS":
            case "SRR":
                count = 2;
                break;
            case "RRR":
                count = 3;
                break;
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int count = 0; count 0 switch(s){
            case "RSS":
            case "SRS":
            case "SSR":
            case "RSR":
                count = 1;
                break;
            case "RRS":
            case "SRR":
                count = 2;
                break;
            case "RRR":
                count = 3;
                break;
        } s case "RSS": "RSS" case "RSS": case "SRS": "SRS" case "SRS": case "SSR": "SSR" case "SSR": case "RSR": "RSR" case "RSR": count = 1 count 1 break; case "RRS": "RRS" case "RRS": case "SRR": "SRR" case "SRR": count = 2 count 2 break; case "RRR": "RRR" case "RRR": count = 3 count 3 break; System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
        switch(s){
            case "RSS":
            case "SRS":
            case "SSR":
            case "RSR":
                count = 1;
                break;
            case "RRS":
            case "SRR":
                count = 2;
                break;
            case "RRR":
                count = 3;
                break;
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
        switch(s){
            case "RSS":
            case "SRS":
            case "SSR":
            case "RSR":
                count = 1;
                break;
            case "RRS":
            case "SRR":
                count = 2;
                break;
            case "RRR":
                count = 3;
                break;
        }
        System.out.println(count);
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        int count = 0;
        switch(s){
            case "RSS":
            case "SRS":
            case "SSR":
            case "RSR":
                count = 1;
                break;
            case "RRS":
            case "SRR":
                count = 2;
                break;
            case "RRR":
                count = 3;
                break;
        }
        System.out.println(count);
    }
}