import java.util.*;
import java.lang.Math;
public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flag = false;
        int counter = 0;
        char[] work = new char[S.length()];
        for(int i = 0; i < S.length(); i++){
            work[i] = S.charAt(i);
            if(work[i] == 'R'){
                counter++;
                flag = true;
            }
            if(work[i] == 'S' && flag){
                break;
            }
        }
        System.out.println(counter);
    }
} import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flag = false;
        int counter = 0;
        char[] work = new char[S.length()];
        for(int i = 0; i < S.length(); i++){
            work[i] = S.charAt(i);
            if(work[i] == 'R'){
                counter++;
                flag = true;
            }
            if(work[i] == 'S' && flag){
                break;
            }
        }
        System.out.println(counter);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flag = false;
        int counter = 0;
        char[] work = new char[S.length()];
        for(int i = 0; i < S.length(); i++){
            work[i] = S.charAt(i);
            if(work[i] == 'R'){
                counter++;
                flag = true;
            }
            if(work[i] == 'S' && flag){
                break;
            }
        }
        System.out.println(counter);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flag = false;
        int counter = 0;
        char[] work = new char[S.length()];
        for(int i = 0; i < S.length(); i++){
            work[i] = S.charAt(i);
            if(work[i] == 'R'){
                counter++;
                flag = true;
            }
            if(work[i] == 'S' && flag){
                break;
            }
        }
        System.out.println(counter);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc boolean flag = false; flag false int counter = 0; counter 0 char[] work = new char[S.length()]; work new char[S.length()] S.length() S.length S for(int i = 0; i < S.length(); i++){
            work[i] = S.charAt(i);
            if(work[i] == 'R'){
                counter++;
                flag = true;
            }
            if(work[i] == 'S' && flag){
                break;
            }
        } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
            work[i] = S.charAt(i);
            if(work[i] == 'R'){
                counter++;
                flag = true;
            }
            if(work[i] == 'S' && flag){
                break;
            }
        } {
            work[i] = S.charAt(i);
            if(work[i] == 'R'){
                counter++;
                flag = true;
            }
            if(work[i] == 'S' && flag){
                break;
            }
        } work[i] = S.charAt(i) work[i] work i S.charAt(i) S.charAt S i if(work[i] == 'R'){
                counter++;
                flag = true;
            } work[i] == 'R' work[i] work i 'R' {
                counter++;
                flag = true;
            } counter++ counter flag = true flag true if(work[i] == 'S' && flag){
                break;
            } work[i] == 'S' && flag work[i] == 'S' work[i] work i 'S' flag {
                break;
            } break; System.out.println(counter) System.out.println System.out System System.out counter String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flag = false;
        int counter = 0;
        char[] work = new char[S.length()];
        for(int i = 0; i < S.length(); i++){
            work[i] = S.charAt(i);
            if(work[i] == 'R'){
                counter++;
                flag = true;
            }
            if(work[i] == 'S' && flag){
                break;
            }
        }
        System.out.println(counter);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flag = false;
        int counter = 0;
        char[] work = new char[S.length()];
        for(int i = 0; i < S.length(); i++){
            work[i] = S.charAt(i);
            if(work[i] == 'R'){
                counter++;
                flag = true;
            }
            if(work[i] == 'S' && flag){
                break;
            }
        }
        System.out.println(counter);
    }
} Main
import java.util.*;
import java.lang.Math;
public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flag = false;
        int counter = 0;
        char[] work = new char[S.length()];
        for(int i = 0; i < S.length(); i++){
            work[i] = S.charAt(i);
            if(work[i] == 'R'){
                counter++;
                flag = true;
            }
            if(work[i] == 'S' && flag){
                break;
            }
        }
        System.out.println(counter);
    }
}
