import java.util.*;

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

        String s = sc.next();

        int ans = 0;

        switch(s){
            case "SSR":
            case "SRS":
            case "RSS":
            case "RSR":
                ans = 1;
                break;
            case "SRR":
            case "RRS":
                ans = 2;
                break;
            case "RRR":
                ans = 3;
                break;
        }

        System.out.print(ans);

    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();

        int ans = 0;

        switch(s){
            case "SSR":
            case "SRS":
            case "RSS":
            case "RSR":
                ans = 1;
                break;
            case "SRR":
            case "RRS":
                ans = 2;
                break;
            case "RRR":
                ans = 3;
                break;
        }

        System.out.print(ans);

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

        String s = sc.next();

        int ans = 0;

        switch(s){
            case "SSR":
            case "SRS":
            case "RSS":
            case "RSR":
                ans = 1;
                break;
            case "SRR":
            case "RRS":
                ans = 2;
                break;
            case "RRR":
                ans = 3;
                break;
        }

        System.out.print(ans);

    } main {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();

        int ans = 0;

        switch(s){
            case "SSR":
            case "SRS":
            case "RSS":
            case "RSR":
                ans = 1;
                break;
            case "SRR":
            case "RRS":
                ans = 2;
                break;
            case "RRR":
                ans = 3;
                break;
        }

        System.out.print(ans);

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

        String s = sc.next();

        int ans = 0;

        switch(s){
            case "SSR":
            case "SRS":
            case "RSS":
            case "RSR":
                ans = 1;
                break;
            case "SRR":
            case "RRS":
                ans = 2;
                break;
            case "RRR":
                ans = 3;
                break;
        }

        System.out.print(ans);

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

        String s = sc.next();

        int ans = 0;

        switch(s){
            case "SSR":
            case "SRS":
            case "RSS":
            case "RSR":
                ans = 1;
                break;
            case "SRR":
            case "RRS":
                ans = 2;
                break;
            case "RRR":
                ans = 3;
                break;
        }

        System.out.print(ans);

    }
} Main
import java.util.*;

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

        String s = sc.next();

        int ans = 0;

        switch(s){
            case "SSR":
            case "SRS":
            case "RSS":
            case "RSR":
                ans = 1;
                break;
            case "SRR":
            case "RRS":
                ans = 2;
                break;
            case "RRR":
                ans = 3;
                break;
        }

        System.out.print(ans);

    }
}
