import java.awt.*;
import java.io.*;
import java.net.StandardSocketOptions;
import java.util.*;

public class Main {
    Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        new Main();
    }
    public Main(){
        new TestA().doIt();
    }
    class TestA{
        void doIt() {
            String str = sc.next();
            String zero[] = {"SSS"};
            String one[] = {"RSS","SRS","SSR","RSR"};
            String two[] = {"RRS","SRR"};
            String three[] = {"RRR"};
            for(int i = 0;i < zero.length;i++){
                if(str.equals(zero[i]))System.out.println(0);
            }
            for(int i = 0;i < one.length;i++) {
                if (str.equals(one[i])) System.out.println(1);
            }
            for(int i = 0;i < two.length;i++){
                if(str.equals(two[i]))System.out.println(2);
            }
            for(int i = 0;i < three.length;i++){
                if(str.equals(three[i]))System.out.println(3);
            }
        }
    }
} import java.awt.*; awt.* java import java.io.*; io.* java import java.net.StandardSocketOptions; StandardSocketOptions java.net import java.util.*; util.* java public class Main {
    Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        new Main();
    }
    public Main(){
        new TestA().doIt();
    }
    class TestA{
        void doIt() {
            String str = sc.next();
            String zero[] = {"SSS"};
            String one[] = {"RSS","SRS","SSR","RSR"};
            String two[] = {"RRS","SRR"};
            String three[] = {"RRR"};
            for(int i = 0;i < zero.length;i++){
                if(str.equals(zero[i]))System.out.println(0);
            }
            for(int i = 0;i < one.length;i++) {
                if (str.equals(one[i])) System.out.println(1);
            }
            for(int i = 0;i < two.length;i++){
                if(str.equals(two[i]))System.out.println(2);
            }
            for(int i = 0;i < three.length;i++){
                if(str.equals(three[i]))System.out.println(3);
            }
        }
    }
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args){
        new Main();
    } main {
        new Main();
    } new Main() String[] args args public Main(){
        new TestA().doIt();
    } Main {
        new TestA().doIt();
    } new TestA().doIt() new TestA().doIt new TestA() class TestA{
        void doIt() {
            String str = sc.next();
            String zero[] = {"SSS"};
            String one[] = {"RSS","SRS","SSR","RSR"};
            String two[] = {"RRS","SRR"};
            String three[] = {"RRR"};
            for(int i = 0;i < zero.length;i++){
                if(str.equals(zero[i]))System.out.println(0);
            }
            for(int i = 0;i < one.length;i++) {
                if (str.equals(one[i])) System.out.println(1);
            }
            for(int i = 0;i < two.length;i++){
                if(str.equals(two[i]))System.out.println(2);
            }
            for(int i = 0;i < three.length;i++){
                if(str.equals(three[i]))System.out.println(3);
            }
        }
    } TestA void doIt() {
            String str = sc.next();
            String zero[] = {"SSS"};
            String one[] = {"RSS","SRS","SSR","RSR"};
            String two[] = {"RRS","SRR"};
            String three[] = {"RRR"};
            for(int i = 0;i < zero.length;i++){
                if(str.equals(zero[i]))System.out.println(0);
            }
            for(int i = 0;i < one.length;i++) {
                if (str.equals(one[i])) System.out.println(1);
            }
            for(int i = 0;i < two.length;i++){
                if(str.equals(two[i]))System.out.println(2);
            }
            for(int i = 0;i < three.length;i++){
                if(str.equals(three[i]))System.out.println(3);
            }
        } doIt {
            String str = sc.next();
            String zero[] = {"SSS"};
            String one[] = {"RSS","SRS","SSR","RSR"};
            String two[] = {"RRS","SRR"};
            String three[] = {"RRR"};
            for(int i = 0;i < zero.length;i++){
                if(str.equals(zero[i]))System.out.println(0);
            }
            for(int i = 0;i < one.length;i++) {
                if (str.equals(one[i])) System.out.println(1);
            }
            for(int i = 0;i < two.length;i++){
                if(str.equals(two[i]))System.out.println(2);
            }
            for(int i = 0;i < three.length;i++){
                if(str.equals(three[i]))System.out.println(3);
            }
        } String str = sc.next(); str sc.next() sc.next sc String zero[] = {"SSS"}; zero {"SSS"} "SSS" String one[] = {"RSS","SRS","SSR","RSR"}; one {"RSS","SRS","SSR","RSR"} "RSS" "SRS" "SSR" "RSR" String two[] = {"RRS","SRR"}; two {"RRS","SRR"} "RRS" "SRR" String three[] = {"RRR"}; three {"RRR"} "RRR" for(int i = 0;i < zero.length;i++){
                if(str.equals(zero[i]))System.out.println(0);
            } int i = 0; int i = 0; i 0 i < zero.length i zero.length zero zero.length i++ i++ i {
                if(str.equals(zero[i]))System.out.println(0);
            } {
                if(str.equals(zero[i]))System.out.println(0);
            } if(str.equals(zero[i]))System.out.println(0); str.equals(zero[i]) str.equals str zero[i] zero i System.out.println(0) System.out.println System.out System System.out 0 for(int i = 0;i < one.length;i++) {
                if (str.equals(one[i])) System.out.println(1);
            } int i = 0; int i = 0; i 0 i < one.length i one.length one one.length i++ i++ i {
                if (str.equals(one[i])) System.out.println(1);
            } {
                if (str.equals(one[i])) System.out.println(1);
            } if (str.equals(one[i])) System.out.println(1); str.equals(one[i]) str.equals str one[i] one i System.out.println(1) System.out.println System.out System System.out 1 for(int i = 0;i < two.length;i++){
                if(str.equals(two[i]))System.out.println(2);
            } int i = 0; int i = 0; i 0 i < two.length i two.length two two.length i++ i++ i {
                if(str.equals(two[i]))System.out.println(2);
            } {
                if(str.equals(two[i]))System.out.println(2);
            } if(str.equals(two[i]))System.out.println(2); str.equals(two[i]) str.equals str two[i] two i System.out.println(2) System.out.println System.out System System.out 2 for(int i = 0;i < three.length;i++){
                if(str.equals(three[i]))System.out.println(3);
            } int i = 0; int i = 0; i 0 i < three.length i three.length three three.length i++ i++ i {
                if(str.equals(three[i]))System.out.println(3);
            } {
                if(str.equals(three[i]))System.out.println(3);
            } if(str.equals(three[i]))System.out.println(3); str.equals(three[i]) str.equals str three[i] three i System.out.println(3) System.out.println System.out System System.out 3 public class Main {
    Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        new Main();
    }
    public Main(){
        new TestA().doIt();
    }
    class TestA{
        void doIt() {
            String str = sc.next();
            String zero[] = {"SSS"};
            String one[] = {"RSS","SRS","SSR","RSR"};
            String two[] = {"RRS","SRR"};
            String three[] = {"RRR"};
            for(int i = 0;i < zero.length;i++){
                if(str.equals(zero[i]))System.out.println(0);
            }
            for(int i = 0;i < one.length;i++) {
                if (str.equals(one[i])) System.out.println(1);
            }
            for(int i = 0;i < two.length;i++){
                if(str.equals(two[i]))System.out.println(2);
            }
            for(int i = 0;i < three.length;i++){
                if(str.equals(three[i]))System.out.println(3);
            }
        }
    }
} public class Main {
    Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        new Main();
    }
    public Main(){
        new TestA().doIt();
    }
    class TestA{
        void doIt() {
            String str = sc.next();
            String zero[] = {"SSS"};
            String one[] = {"RSS","SRS","SSR","RSR"};
            String two[] = {"RRS","SRR"};
            String three[] = {"RRR"};
            for(int i = 0;i < zero.length;i++){
                if(str.equals(zero[i]))System.out.println(0);
            }
            for(int i = 0;i < one.length;i++) {
                if (str.equals(one[i])) System.out.println(1);
            }
            for(int i = 0;i < two.length;i++){
                if(str.equals(two[i]))System.out.println(2);
            }
            for(int i = 0;i < three.length;i++){
                if(str.equals(three[i]))System.out.println(3);
            }
        }
    }
} Main
import java.awt.*;
import java.io.*;
import java.net.StandardSocketOptions;
import java.util.*;

public class Main {
    Scanner sc = new Scanner(System.in);
    public static void main(String[] args){
        new Main();
    }
    public Main(){
        new TestA().doIt();
    }
    class TestA{
        void doIt() {
            String str = sc.next();
            String zero[] = {"SSS"};
            String one[] = {"RSS","SRS","SSR","RSR"};
            String two[] = {"RRS","SRR"};
            String three[] = {"RRR"};
            for(int i = 0;i < zero.length;i++){
                if(str.equals(zero[i]))System.out.println(0);
            }
            for(int i = 0;i < one.length;i++) {
                if (str.equals(one[i])) System.out.println(1);
            }
            for(int i = 0;i < two.length;i++){
                if(str.equals(two[i]))System.out.println(2);
            }
            for(int i = 0;i < three.length;i++){
                if(str.equals(three[i]))System.out.println(3);
            }
        }
    }
}