import java.util.*;

public class Main{

    static int[] dp;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cs = s.toCharArray();
        dp = new int[3];
        
        dp[0] = (cs[0]=='R'?1:0);

        for(int i=1;i<3;i++){
            dp[i] = cs[i]=='R'?(dp[i-1]+1):0;
        }

        int max = 0;
        for (int i = 0; i < 3; i++) {
            max = Math.max(max, dp[i]);
        }

        System.out.println(max);

        sc.close();
    }


} import java.util.*; util.* java public class Main{

    static int[] dp;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cs = s.toCharArray();
        dp = new int[3];
        
        dp[0] = (cs[0]=='R'?1:0);

        for(int i=1;i<3;i++){
            dp[i] = cs[i]=='R'?(dp[i-1]+1):0;
        }

        int max = 0;
        for (int i = 0; i < 3; i++) {
            max = Math.max(max, dp[i]);
        }

        System.out.println(max);

        sc.close();
    }


} Main static int[] dp; dp public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cs = s.toCharArray();
        dp = new int[3];
        
        dp[0] = (cs[0]=='R'?1:0);

        for(int i=1;i<3;i++){
            dp[i] = cs[i]=='R'?(dp[i-1]+1):0;
        }

        int max = 0;
        for (int i = 0; i < 3; i++) {
            max = Math.max(max, dp[i]);
        }

        System.out.println(max);

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cs = s.toCharArray();
        dp = new int[3];
        
        dp[0] = (cs[0]=='R'?1:0);

        for(int i=1;i<3;i++){
            dp[i] = cs[i]=='R'?(dp[i-1]+1):0;
        }

        int max = 0;
        for (int i = 0; i < 3; i++) {
            max = Math.max(max, dp[i]);
        }

        System.out.println(max);

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char[] cs = s.toCharArray(); cs s.toCharArray() s.toCharArray s dp = new int[3] dp new int[3] 3 dp[0] = (cs[0]=='R'?1:0) dp[0] dp 0 (cs[0]=='R'?1:0) cs[0]=='R' cs[0] cs 0 'R' 1 0 for(int i=1;i<3;i++){
            dp[i] = cs[i]=='R'?(dp[i-1]+1):0;
        } int i=1; int i=1; i 1 i<3 i 3 i++ i++ i {
            dp[i] = cs[i]=='R'?(dp[i-1]+1):0;
        } {
            dp[i] = cs[i]=='R'?(dp[i-1]+1):0;
        } dp[i] = cs[i]=='R'?(dp[i-1]+1):0 dp[i] dp i cs[i]=='R'?(dp[i-1]+1):0 cs[i]=='R' cs[i] cs i 'R' (dp[i-1]+1) dp[i-1] dp i-1 i 1 1 0 int max = 0; max 0 for (int i = 0; i < 3; i++) {
            max = Math.max(max, dp[i]);
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            max = Math.max(max, dp[i]);
        } {
            max = Math.max(max, dp[i]);
        } max = Math.max(max, dp[i]) max Math.max(max, dp[i]) Math.max Math max dp[i] dp i System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc String[] args args public class Main{

    static int[] dp;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cs = s.toCharArray();
        dp = new int[3];
        
        dp[0] = (cs[0]=='R'?1:0);

        for(int i=1;i<3;i++){
            dp[i] = cs[i]=='R'?(dp[i-1]+1):0;
        }

        int max = 0;
        for (int i = 0; i < 3; i++) {
            max = Math.max(max, dp[i]);
        }

        System.out.println(max);

        sc.close();
    }


} public class Main{

    static int[] dp;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cs = s.toCharArray();
        dp = new int[3];
        
        dp[0] = (cs[0]=='R'?1:0);

        for(int i=1;i<3;i++){
            dp[i] = cs[i]=='R'?(dp[i-1]+1):0;
        }

        int max = 0;
        for (int i = 0; i < 3; i++) {
            max = Math.max(max, dp[i]);
        }

        System.out.println(max);

        sc.close();
    }


} Main
import java.util.*;

public class Main{

    static int[] dp;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        char[] cs = s.toCharArray();
        dp = new int[3];
        
        dp[0] = (cs[0]=='R'?1:0);

        for(int i=1;i<3;i++){
            dp[i] = cs[i]=='R'?(dp[i-1]+1):0;
        }

        int max = 0;
        for (int i = 0; i < 3; i++) {
            max = Math.max(max, dp[i]);
        }

        System.out.println(max);

        sc.close();
    }


}