import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;

        scanner.close();

        for (int i = 0; i < 3; i++){
            if (S.charAt(i) == 'R'){
                count++;
            }
        }
        if (S.equals("RSR")){
            count = 1;
        }
        
        System.out.println(count);
    }
}
 import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;

        scanner.close();

        for (int i = 0; i < 3; i++){
            if (S.charAt(i) == 'R'){
                count++;
            }
        }
        if (S.equals("RSR")){
            count = 1;
        }
        
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;

        scanner.close();

        for (int i = 0; i < 3; i++){
            if (S.charAt(i) == 'R'){
                count++;
            }
        }
        if (S.equals("RSR")){
            count = 1;
        }
        
        System.out.println(count);
    } main {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;

        scanner.close();

        for (int i = 0; i < 3; i++){
            if (S.charAt(i) == 'R'){
                count++;
            }
        }
        if (S.equals("RSR")){
            count = 1;
        }
        
        System.out.println(count);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.next(); S scanner.next() scanner.next scanner int count = 0; count 0 scanner.close() scanner.close scanner for (int i = 0; i < 3; i++){
            if (S.charAt(i) == 'R'){
                count++;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            if (S.charAt(i) == 'R'){
                count++;
            }
        } {
            if (S.charAt(i) == 'R'){
                count++;
            }
        } if (S.charAt(i) == 'R'){
                count++;
            } S.charAt(i) == 'R' S.charAt(i) S.charAt S i 'R' {
                count++;
            } count++ count if (S.equals("RSR")){
            count = 1;
        } S.equals("RSR") S.equals S "RSR" {
            count = 1;
        } count = 1 count 1 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 scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;

        scanner.close();

        for (int i = 0; i < 3; i++){
            if (S.charAt(i) == 'R'){
                count++;
            }
        }
        if (S.equals("RSR")){
            count = 1;
        }
        
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;

        scanner.close();

        for (int i = 0; i < 3; i++){
            if (S.charAt(i) == 'R'){
                count++;
            }
        }
        if (S.equals("RSR")){
            count = 1;
        }
        
        System.out.println(count);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int count = 0;

        scanner.close();

        for (int i = 0; i < 3; i++){
            if (S.charAt(i) == 'R'){
                count++;
            }
        }
        if (S.equals("RSR")){
            count = 1;
        }
        
        System.out.println(count);
    }
}

