import java.util.Scanner;

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

        int cnt = 0;
        boolean day1 = s[0] == 'R';
        boolean day2 = s[1] == 'R';
        boolean day3 = s[2] == 'R';

        if(day1 && day2 && day3) cnt = 3;
        else if((day1 && day2) || (day2 && day3)) cnt = 2;
        else if(day1 || day2 || day3) cnt = 1;
        else cnt = 0;
        System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        sc.close();

        int cnt = 0;
        boolean day1 = s[0] == 'R';
        boolean day2 = s[1] == 'R';
        boolean day3 = s[2] == 'R';

        if(day1 && day2 && day3) cnt = 3;
        else if((day1 && day2) || (day2 && day3)) cnt = 2;
        else if(day1 || day2 || day3) cnt = 1;
        else cnt = 0;
        System.out.println(cnt);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        sc.close();

        int cnt = 0;
        boolean day1 = s[0] == 'R';
        boolean day2 = s[1] == 'R';
        boolean day3 = s[2] == 'R';

        if(day1 && day2 && day3) cnt = 3;
        else if((day1 && day2) || (day2 && day3)) cnt = 2;
        else if(day1 || day2 || day3) cnt = 1;
        else cnt = 0;
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        sc.close();

        int cnt = 0;
        boolean day1 = s[0] == 'R';
        boolean day2 = s[1] == 'R';
        boolean day3 = s[2] == 'R';

        if(day1 && day2 && day3) cnt = 3;
        else if((day1 && day2) || (day2 && day3)) cnt = 2;
        else if(day1 || day2 || day3) cnt = 1;
        else cnt = 0;
        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.nextLine().toCharArray(); s sc.nextLine().toCharArray() sc.nextLine().toCharArray sc.nextLine() sc.nextLine sc sc.close() sc.close sc int cnt = 0; cnt 0 boolean day1 = s[0] == 'R'; day1 s[0] == 'R' s[0] s 0 'R' boolean day2 = s[1] == 'R'; day2 s[1] == 'R' s[1] s 1 'R' boolean day3 = s[2] == 'R'; day3 s[2] == 'R' s[2] s 2 'R' if(day1 && day2 && day3) cnt = 3;
        else if((day1 && day2) || (day2 && day3)) cnt = 2;
        else if(day1 || day2 || day3) cnt = 1;
        else cnt = 0; day1 && day2 && day3 day1 && day2 && day3 day1 day2 day3 cnt = 3 cnt 3 if((day1 && day2) || (day2 && day3)) cnt = 2;
        else if(day1 || day2 || day3) cnt = 1;
        else cnt = 0; (day1 && day2) || (day2 && day3) (day1 && day2) day1 day2 (day2 && day3) day2 day3 cnt = 2 cnt 2 if(day1 || day2 || day3) cnt = 1;
        else cnt = 0; day1 || day2 || day3 day1 || day2 || day3 day1 day2 day3 cnt = 1 cnt 1 cnt = 0 cnt 0 System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        sc.close();

        int cnt = 0;
        boolean day1 = s[0] == 'R';
        boolean day2 = s[1] == 'R';
        boolean day3 = s[2] == 'R';

        if(day1 && day2 && day3) cnt = 3;
        else if((day1 && day2) || (day2 && day3)) cnt = 2;
        else if(day1 || day2 || day3) cnt = 1;
        else cnt = 0;
        System.out.println(cnt);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();
        sc.close();

        int cnt = 0;
        boolean day1 = s[0] == 'R';
        boolean day2 = s[1] == 'R';
        boolean day3 = s[2] == 'R';

        if(day1 && day2 && day3) cnt = 3;
        else if((day1 && day2) || (day2 && day3)) cnt = 2;
        else if(day1 || day2 || day3) cnt = 1;
        else cnt = 0;
        System.out.println(cnt);
    }
} Main
import java.util.Scanner;

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

        int cnt = 0;
        boolean day1 = s[0] == 'R';
        boolean day2 = s[1] == 'R';
        boolean day3 = s[2] == 'R';

        if(day1 && day2 && day3) cnt = 3;
        else if((day1 && day2) || (day2 && day3)) cnt = 2;
        else if(day1 || day2 || day3) cnt = 1;
        else cnt = 0;
        System.out.println(cnt);
    }
}
