import java.util.*;
import java.io.*;
// import lib.util.*;
// import lib.graph.*;
// import lib.io.*;
// import lib.math.*;
import java.math.BigInteger;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (s[i] == 'R') {
                res++;
            }
        }
        if (s[1] != 'R' && res == 2) {
            System.out.println(1);
        } else {
            System.out.println(res);
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.math.BigInteger; BigInteger java.math public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (s[i] == 'R') {
                res++;
            }
        }
        if (s[1] != 'R' && res == 2) {
            System.out.println(1);
        } else {
            System.out.println(res);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (s[i] == 'R') {
                res++;
            }
        }
        if (s[1] != 'R' && res == 2) {
            System.out.println(1);
        } else {
            System.out.println(res);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (s[i] == 'R') {
                res++;
            }
        }
        if (s[1] != 'R' && res == 2) {
            System.out.println(1);
        } else {
            System.out.println(res);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int res = 0; res 0 for (int i = 0; i < 3; i++) {
            if (s[i] == 'R') {
                res++;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            if (s[i] == 'R') {
                res++;
            }
        } {
            if (s[i] == 'R') {
                res++;
            }
        } if (s[i] == 'R') {
                res++;
            } s[i] == 'R' s[i] s i 'R' {
                res++;
            } res++ res if (s[1] != 'R' && res == 2) {
            System.out.println(1);
        } else {
            System.out.println(res);
        } s[1] != 'R' && res == 2 s[1] != 'R' s[1] s 1 'R' res == 2 res 2 {
            System.out.println(1);
        } System.out.println(1) System.out.println System.out System System.out 1 {
            System.out.println(res);
        } System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (s[i] == 'R') {
                res++;
            }
        }
        if (s[1] != 'R' && res == 2) {
            System.out.println(1);
        } else {
            System.out.println(res);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (s[i] == 'R') {
                res++;
            }
        }
        if (s[1] != 'R' && res == 2) {
            System.out.println(1);
        } else {
            System.out.println(res);
        }
    }
} Main
import java.util.*;
import java.io.*;
// import lib.util.*;
// import lib.graph.*;
// import lib.io.*;
// import lib.math.*;
import java.math.BigInteger;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (s[i] == 'R') {
                res++;
            }
        }
        if (s[1] != 'R' && res == 2) {
            System.out.println(1);
        } else {
            System.out.println(res);
        }
    }
}