
import java.util.Scanner;

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

        char[] S = scanner.next().toCharArray();

        int count = 0;

        if (S[0] == 'R' && S[1] == 'R' && S[2] == 'R') {
            count = 3;
        } else if ((S[0] == 'R' && S[1] == 'R')|| (S[1] == 'R' && S[2] == 'R')) {
            count = 2;
        } else if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R') {
            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);

        char[] S = scanner.next().toCharArray();

        int count = 0;

        if (S[0] == 'R' && S[1] == 'R' && S[2] == 'R') {
            count = 3;
        } else if ((S[0] == 'R' && S[1] == 'R')|| (S[1] == 'R' && S[2] == 'R')) {
            count = 2;
        } else if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R') {
            count = 1;
        }
        System.out.println(count);

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

        char[] S = scanner.next().toCharArray();

        int count = 0;

        if (S[0] == 'R' && S[1] == 'R' && S[2] == 'R') {
            count = 3;
        } else if ((S[0] == 'R' && S[1] == 'R')|| (S[1] == 'R' && S[2] == 'R')) {
            count = 2;
        } else if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R') {
            count = 1;
        }
        System.out.println(count);

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

        char[] S = scanner.next().toCharArray();

        int count = 0;

        if (S[0] == 'R' && S[1] == 'R' && S[2] == 'R') {
            count = 3;
        } else if ((S[0] == 'R' && S[1] == 'R')|| (S[1] == 'R' && S[2] == 'R')) {
            count = 2;
        } else if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R') {
            count = 1;
        }
        System.out.println(count);

    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] S = scanner.next().toCharArray(); S scanner.next().toCharArray() scanner.next().toCharArray scanner.next() scanner.next scanner int count = 0; count 0 if (S[0] == 'R' && S[1] == 'R' && S[2] == 'R') {
            count = 3;
        } else if ((S[0] == 'R' && S[1] == 'R')|| (S[1] == 'R' && S[2] == 'R')) {
            count = 2;
        } else if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R') {
            count = 1;
        } S[0] == 'R' && S[1] == 'R' && S[2] == 'R' S[0] == 'R' && S[1] == 'R' && S[2] == 'R' S[0] == 'R' S[0] S 0 'R' S[1] == 'R' S[1] S 1 'R' S[2] == 'R' S[2] S 2 'R' {
            count = 3;
        } count = 3 count 3 if ((S[0] == 'R' && S[1] == 'R')|| (S[1] == 'R' && S[2] == 'R')) {
            count = 2;
        } else if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R') {
            count = 1;
        } (S[0] == 'R' && S[1] == 'R')|| (S[1] == 'R' && S[2] == 'R') (S[0] == 'R' && S[1] == 'R') S[0] == 'R' S[0] S 0 'R' S[1] == 'R' S[1] S 1 'R' (S[1] == 'R' && S[2] == 'R') S[1] == 'R' S[1] S 1 'R' S[2] == 'R' S[2] S 2 'R' {
            count = 2;
        } count = 2 count 2 if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R') {
            count = 1;
        } S[0] == 'R' || S[1] == 'R' || S[2] == 'R' S[0] == 'R' || S[1] == 'R' || S[2] == 'R' S[0] == 'R' S[0] S 0 'R' S[1] == 'R' S[1] S 1 'R' S[2] == 'R' S[2] S 2 'R' {
            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);

        char[] S = scanner.next().toCharArray();

        int count = 0;

        if (S[0] == 'R' && S[1] == 'R' && S[2] == 'R') {
            count = 3;
        } else if ((S[0] == 'R' && S[1] == 'R')|| (S[1] == 'R' && S[2] == 'R')) {
            count = 2;
        } else if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R') {
            count = 1;
        }
        System.out.println(count);

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

        char[] S = scanner.next().toCharArray();

        int count = 0;

        if (S[0] == 'R' && S[1] == 'R' && S[2] == 'R') {
            count = 3;
        } else if ((S[0] == 'R' && S[1] == 'R')|| (S[1] == 'R' && S[2] == 'R')) {
            count = 2;
        } else if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R') {
            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);

        char[] S = scanner.next().toCharArray();

        int count = 0;

        if (S[0] == 'R' && S[1] == 'R' && S[2] == 'R') {
            count = 3;
        } else if ((S[0] == 'R' && S[1] == 'R')|| (S[1] == 'R' && S[2] == 'R')) {
            count = 2;
        } else if (S[0] == 'R' || S[1] == 'R' || S[2] == 'R') {
            count = 1;
        }
        System.out.println(count);

    }
}
