
import java.util.*;
import java.io.*;
import java.math.BigInteger;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author prem_cse
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    }

    static class Solution{
  
    	
        public void solve(int testNumber, FastReader sc, PrintWriter out) {
        
        	String s = sc.next();
        	int ans = 0;
        	if(s.contains("RRR")) ans = 3;
        	else if(s.contains("RR")) ans = 2;
        	else if(s.contains("R")) ans = 1;
        	out.print(ans);
        }

	
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader(InputStream stream) {
            br = new BufferedReader(new
                    InputStreamReader(stream), 32768);
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}
 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) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    }

    static class Solution{
  
    	
        public void solve(int testNumber, FastReader sc, PrintWriter out) {
        
        	String s = sc.next();
        	int ans = 0;
        	if(s.contains("RRR")) ans = 3;
        	else if(s.contains("RR")) ans = 2;
        	else if(s.contains("R")) ans = 1;
        	out.print(ans);
        }

	
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader(InputStream stream) {
            br = new BufferedReader(new
                    InputStreamReader(stream), 32768);
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out FastReader in = new FastReader(inputStream); in new FastReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) Solution solver = new Solution(); solver new Solution() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class Solution{
  
    	
        public void solve(int testNumber, FastReader sc, PrintWriter out) {
        
        	String s = sc.next();
        	int ans = 0;
        	if(s.contains("RRR")) ans = 3;
        	else if(s.contains("RR")) ans = 2;
        	else if(s.contains("R")) ans = 1;
        	out.print(ans);
        }

	
    } Solution public void solve(int testNumber, FastReader sc, PrintWriter out) {
        
        	String s = sc.next();
        	int ans = 0;
        	if(s.contains("RRR")) ans = 3;
        	else if(s.contains("RR")) ans = 2;
        	else if(s.contains("R")) ans = 1;
        	out.print(ans);
        } solve {
        
        	String s = sc.next();
        	int ans = 0;
        	if(s.contains("RRR")) ans = 3;
        	else if(s.contains("RR")) ans = 2;
        	else if(s.contains("R")) ans = 1;
        	out.print(ans);
        } String s = sc.next(); s sc.next() sc.next sc int ans = 0; ans 0 if(s.contains("RRR")) ans = 3;
        	else if(s.contains("RR")) ans = 2;
        	else if(s.contains("R")) ans = 1; s.contains("RRR") s.contains s "RRR" ans = 3 ans 3 if(s.contains("RR")) ans = 2;
        	else if(s.contains("R")) ans = 1; s.contains("RR") s.contains s "RR" ans = 2 ans 2 if(s.contains("R")) ans = 1; s.contains("R") s.contains s "R" ans = 1 ans 1 out.print(ans) out.print out ans int testNumber testNumber FastReader sc sc PrintWriter out out static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader(InputStream stream) {
            br = new BufferedReader(new
                    InputStreamReader(stream), 32768);
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    } FastReader BufferedReader br; br StringTokenizer st; st public FastReader(InputStream stream) {
            br = new BufferedReader(new
                    InputStreamReader(stream), 32768);
        } FastReader {
            br = new BufferedReader(new
                    InputStreamReader(stream), 32768);
        } br = new BufferedReader(new
                    InputStreamReader(stream), 32768) br new BufferedReader(new
                    InputStreamReader(stream), 32768) InputStream stream stream public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    }

    static class Solution{
  
    	
        public void solve(int testNumber, FastReader sc, PrintWriter out) {
        
        	String s = sc.next();
        	int ans = 0;
        	if(s.contains("RRR")) ans = 3;
        	else if(s.contains("RR")) ans = 2;
        	else if(s.contains("R")) ans = 1;
        	out.print(ans);
        }

	
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader(InputStream stream) {
            br = new BufferedReader(new
                    InputStreamReader(stream), 32768);
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    }

    static class Solution{
  
    	
        public void solve(int testNumber, FastReader sc, PrintWriter out) {
        
        	String s = sc.next();
        	int ans = 0;
        	if(s.contains("RRR")) ans = 3;
        	else if(s.contains("RR")) ans = 2;
        	else if(s.contains("R")) ans = 1;
        	out.print(ans);
        }

	
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader(InputStream stream) {
            br = new BufferedReader(new
                    InputStreamReader(stream), 32768);
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
} Main

import java.util.*;
import java.io.*;
import java.math.BigInteger;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author prem_cse
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    }

    static class Solution{
  
    	
        public void solve(int testNumber, FastReader sc, PrintWriter out) {
        
        	String s = sc.next();
        	int ans = 0;
        	if(s.contains("RRR")) ans = 3;
        	else if(s.contains("RR")) ans = 2;
        	else if(s.contains("R")) ans = 1;
        	out.print(ans);
        }

	
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader(InputStream stream) {
            br = new BufferedReader(new
                    InputStreamReader(stream), 32768);
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}

