
import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        boolean wasR = false;
        int ans = 0;
        int temp = 0;
        for(int i = 0; i <3; i++) {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        }
        os.println(ans);
    }
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        boolean wasR = false;
        int ans = 0;
        int temp = 0;
        for(int i = 0; i <3; i++) {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        }
        os.println(ans);
    }
} Main public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    } main {
        solve(System.in, System.out);
    } solve(System.in, System.out) solve System.in System System.in System.out System System.out String[] args args static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        boolean wasR = false;
        int ans = 0;
        int temp = 0;
        for(int i = 0; i <3; i++) {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        }
        os.println(ans);
    } solve {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        boolean wasR = false;
        int ans = 0;
        int temp = 0;
        for(int i = 0; i <3; i++) {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        }
        os.println(ans);
    } Scanner scan = new Scanner(is); scan new Scanner(is) String S = scan.next(); S scan.next() scan.next scan boolean wasR = false; wasR false int ans = 0; ans 0 int temp = 0; temp 0 for(int i = 0; i <3; i++) {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        } int i = 0; int i = 0; i 0 i <3 i 3 i++ i++ i {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        } {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        } boolean isR = false; isR false if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0; S.charAt(i) == 'R' S.charAt(i) S.charAt S i 'R' {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } isR = true isR true if(wasR)
                    temp++;
                else
                    temp = 1; wasR temp++ temp temp = 1 temp 1 temp = 0 temp 0 wasR = isR wasR isR ans = Math.max(ans, temp) ans Math.max(ans, temp) Math.max Math ans temp os.println(ans) os.println os ans InputStream is is PrintStream os os public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        boolean wasR = false;
        int ans = 0;
        int temp = 0;
        for(int i = 0; i <3; i++) {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        }
        os.println(ans);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        boolean wasR = false;
        int ans = 0;
        int temp = 0;
        for(int i = 0; i <3; i++) {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        }
        os.println(ans);
    }
} Main

import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        boolean wasR = false;
        int ans = 0;
        int temp = 0;
        for(int i = 0; i <3; i++) {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        }
        os.println(ans);
    }
}