import java.io.*;
import java.util.*;

public class Main {
    static PrintWriter pw;
    static Scanner sc;
    static char[] arr;
    static int[][] dp;
    static long ceildiv(long x, long y) { return (x+y-1)/y; }
    static int mod(long x, int m) { return (int)((x%m+m)%m); }
    static void put(TreeMap<Integer, Integer> map, Integer p){if(map.containsKey(p)) map.replace(p, map.get(p)+1); else map.put(p, 1); }
    static void rem(TreeMap<Integer, Integer> map, Integer p){ if(map.get(p)==1) map.remove(p);else map.replace(p, map.get(p)-1); }
    static long gcd(long x, long y) {return y==0?x:gcd(y, x%y);}
    static int Int(boolean x){ return x?1:0; }
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        pw=new PrintWriter(System.out);
        String s=sc.nextLine();
        int max=0;
        for(int i=0; i<3;){
            int x=0;
            while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            }
            max=Math.max(x, max);
            if(x==0)
                i++;
        }
        pw.println(max);
        pw.close();
    }
    static void printArr(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(long[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(Integer[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    }
    static void printArr(char[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i]==0? '1': arr[i]);
        pw.println();
    }
    static void printArr(ArrayList<Integer> list) {
        for (int i = 0; i < list.size(); i++)
            pw.print(list.get(i)+" ");
        pw.println();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public Pair nextPair() throws IOException{
            return new Pair(nextInt(), nextInt());
        }
        public Pair[] nextPairArr(int n) throws IOException{
            Pair[] arr=new Pair[n];
            for(int i=0; i<n; i++)
                arr[i]=nextPair();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x*1000+this.y);
        }
        public int compareTo(Pair p){
            int min1=Math.min(x, y), min2=Math.min(p.x, p.y);
            if(min1!=min2)
                return min1-min2;
            if(x==p.x)
                return y-p.y;
            return x-p.x;
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x==p.x && this.y==p.y;
        }
        public Pair clone(){
            return new Pair(x, y);
        }
        public String toString(){
            return this.x+" "+this.y;
        }
        public void add(Pair p){
            x+=p.x;
            y+=p.y;
        }
    }
    static class Union{
        int[] rep, size;
        int sets;
        public Union(int n){
            rep=new int[n];
            size=new int[n];
            sets=n;
            Arrays.fill(size, 1);
            for(int i=0; i<n; i++)
                rep[i]=i;
        }
        public void join(int x, int y){
            int a=getSet(x), b=getSet(y);
            if(a==b) return;
            sets--;
            if(size[a]>size[b]){
                rep[b]=a;
                size[a]+=size[b];
            }else{
                rep[a]=b;
                size[b]+=size[a];
            }
        }
        public int getSet(int x){
            if(rep[x]==x)
                return x;
            return rep[x]=getSet(rep[x]);
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    static PrintWriter pw;
    static Scanner sc;
    static char[] arr;
    static int[][] dp;
    static long ceildiv(long x, long y) { return (x+y-1)/y; }
    static int mod(long x, int m) { return (int)((x%m+m)%m); }
    static void put(TreeMap<Integer, Integer> map, Integer p){if(map.containsKey(p)) map.replace(p, map.get(p)+1); else map.put(p, 1); }
    static void rem(TreeMap<Integer, Integer> map, Integer p){ if(map.get(p)==1) map.remove(p);else map.replace(p, map.get(p)-1); }
    static long gcd(long x, long y) {return y==0?x:gcd(y, x%y);}
    static int Int(boolean x){ return x?1:0; }
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        pw=new PrintWriter(System.out);
        String s=sc.nextLine();
        int max=0;
        for(int i=0; i<3;){
            int x=0;
            while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            }
            max=Math.max(x, max);
            if(x==0)
                i++;
        }
        pw.println(max);
        pw.close();
    }
    static void printArr(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(long[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(Integer[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    }
    static void printArr(char[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i]==0? '1': arr[i]);
        pw.println();
    }
    static void printArr(ArrayList<Integer> list) {
        for (int i = 0; i < list.size(); i++)
            pw.print(list.get(i)+" ");
        pw.println();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public Pair nextPair() throws IOException{
            return new Pair(nextInt(), nextInt());
        }
        public Pair[] nextPairArr(int n) throws IOException{
            Pair[] arr=new Pair[n];
            for(int i=0; i<n; i++)
                arr[i]=nextPair();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x*1000+this.y);
        }
        public int compareTo(Pair p){
            int min1=Math.min(x, y), min2=Math.min(p.x, p.y);
            if(min1!=min2)
                return min1-min2;
            if(x==p.x)
                return y-p.y;
            return x-p.x;
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x==p.x && this.y==p.y;
        }
        public Pair clone(){
            return new Pair(x, y);
        }
        public String toString(){
            return this.x+" "+this.y;
        }
        public void add(Pair p){
            x+=p.x;
            y+=p.y;
        }
    }
    static class Union{
        int[] rep, size;
        int sets;
        public Union(int n){
            rep=new int[n];
            size=new int[n];
            sets=n;
            Arrays.fill(size, 1);
            for(int i=0; i<n; i++)
                rep[i]=i;
        }
        public void join(int x, int y){
            int a=getSet(x), b=getSet(y);
            if(a==b) return;
            sets--;
            if(size[a]>size[b]){
                rep[b]=a;
                size[a]+=size[b];
            }else{
                rep[a]=b;
                size[b]+=size[a];
            }
        }
        public int getSet(int x){
            if(rep[x]==x)
                return x;
            return rep[x]=getSet(rep[x]);
        }
    }
} Main static PrintWriter pw; pw static Scanner sc; sc static char[] arr; arr static int[][] dp; dp static long ceildiv(long x, long y) { return (x+y-1)/y; } ceildiv { return (x+y-1)/y; } return (x+y-1)/y; (x+y-1)/y (x+y-1) x+y x y 1 y long x x long y y static int mod(long x, int m) { return (int)((x%m+m)%m); } mod { return (int)((x%m+m)%m); } return (int)((x%m+m)%m); (int)((x%m+m)%m) (x%m+m) x%m x m m m long x x int m m static void put(TreeMap<Integer, Integer> map, Integer p){if(map.containsKey(p)) map.replace(p, map.get(p)+1); else map.put(p, 1); } put {if(map.containsKey(p)) map.replace(p, map.get(p)+1); else map.put(p, 1); } if(map.containsKey(p)) map.replace(p, map.get(p)+1); else map.put(p, 1); map.containsKey(p) map.containsKey map p map.replace(p, map.get(p)+1) map.replace map p map.get(p)+1 map.get(p) map.get map p 1 map.put(p, 1) map.put map p 1 TreeMap<Integer, Integer> map map Integer p p static void rem(TreeMap<Integer, Integer> map, Integer p){ if(map.get(p)==1) map.remove(p);else map.replace(p, map.get(p)-1); } rem { if(map.get(p)==1) map.remove(p);else map.replace(p, map.get(p)-1); } if(map.get(p)==1) map.remove(p);else map.replace(p, map.get(p)-1); map.get(p)==1 map.get(p) map.get map p 1 map.remove(p) map.remove map p map.replace(p, map.get(p)-1) map.replace map p map.get(p)-1 map.get(p) map.get map p 1 TreeMap<Integer, Integer> map map Integer p p static long gcd(long x, long y) {return y==0?x:gcd(y, x%y);} gcd {return y==0?x:gcd(y, x%y);} return y==0?x:gcd(y, x%y); y==0?x:gcd(y, x%y) y==0 y 0 x gcd(y, x%y) gcd y x%y x y long x x long y y static int Int(boolean x){ return x?1:0; } Int { return x?1:0; } return x?1:0; x?1:0 x 1 0 boolean x x public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        pw=new PrintWriter(System.out);
        String s=sc.nextLine();
        int max=0;
        for(int i=0; i<3;){
            int x=0;
            while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            }
            max=Math.max(x, max);
            if(x==0)
                i++;
        }
        pw.println(max);
        pw.close();
    } main {
        sc = new Scanner(System.in);
        pw=new PrintWriter(System.out);
        String s=sc.nextLine();
        int max=0;
        for(int i=0; i<3;){
            int x=0;
            while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            }
            max=Math.max(x, max);
            if(x==0)
                i++;
        }
        pw.println(max);
        pw.close();
    } sc = new Scanner(System.in) sc new Scanner(System.in) pw=new PrintWriter(System.out) pw new PrintWriter(System.out) String s=sc.nextLine(); s sc.nextLine() sc.nextLine sc int max=0; max 0 for(int i=0; i<3;){
            int x=0;
            while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            }
            max=Math.max(x, max);
            if(x==0)
                i++;
        } int i=0; int i=0; i 0 i<3 i 3 {
            int x=0;
            while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            }
            max=Math.max(x, max);
            if(x==0)
                i++;
        } {
            int x=0;
            while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            }
            max=Math.max(x, max);
            if(x==0)
                i++;
        } int x=0; x 0 while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            } i<3 && s.charAt(i)=='R' i<3 i 3 s.charAt(i)=='R' s.charAt(i) s.charAt s i 'R' {
                x++;
                i++;
            } x++ x i++ i max=Math.max(x, max) max Math.max(x, max) Math.max Math x max if(x==0)
                i++; x==0 x 0 i++ i pw.println(max) pw.println pw max pw.close() pw.close pw String[] args args static void printArr(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    } printArr {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    } for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " "); int i = 0; int i = 0; i 0 i < arr.length - 1 i arr.length - 1 arr.length arr arr.length 1 i++ i++ i pw.print(arr[i] + " "); pw.print(arr[i] + " ") pw.print pw arr[i] + " " arr[i] arr i " " pw.println(arr[arr.length - 1]) pw.println pw arr[arr.length - 1] arr arr.length - 1 arr.length arr arr.length 1 int[] arr arr static void printArr(long[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    } printArr {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    } for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " "); int i = 0; int i = 0; i 0 i < arr.length - 1 i arr.length - 1 arr.length arr arr.length 1 i++ i++ i pw.print(arr[i] + " "); pw.print(arr[i] + " ") pw.print pw arr[i] + " " arr[i] arr i " " pw.println(arr[arr.length - 1]) pw.println pw arr[arr.length - 1] arr arr.length - 1 arr.length arr arr.length 1 long[] arr arr static void printArr(Integer[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    } printArr {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    } for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " "); int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i pw.print(arr[i] + " "); pw.print(arr[i] + " ") pw.print pw arr[i] + " " arr[i] arr i " " pw.println() pw.println pw Integer[] arr arr static void printArr(char[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i]==0? '1': arr[i]);
        pw.println();
    } printArr {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i]==0? '1': arr[i]);
        pw.println();
    } for (int i = 0; i < arr.length; i++)
            pw.print(arr[i]==0? '1': arr[i]); int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i pw.print(arr[i]==0? '1': arr[i]); pw.print(arr[i]==0? '1': arr[i]) pw.print pw arr[i]==0? '1': arr[i] arr[i]==0 arr[i] arr i 0 '1' arr[i] arr i pw.println() pw.println pw char[] arr arr static void printArr(ArrayList<Integer> list) {
        for (int i = 0; i < list.size(); i++)
            pw.print(list.get(i)+" ");
        pw.println();
    } printArr {
        for (int i = 0; i < list.size(); i++)
            pw.print(list.get(i)+" ");
        pw.println();
    } for (int i = 0; i < list.size(); i++)
            pw.print(list.get(i)+" "); int i = 0; int i = 0; i 0 i < list.size() i list.size() list.size list i++ i++ i pw.print(list.get(i)+" "); pw.print(list.get(i)+" ") pw.print pw list.get(i)+" " list.get(i) list.get list i " " pw.println() pw.println pw ArrayList<Integer> list list static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public Pair nextPair() throws IOException{
            return new Pair(nextInt(), nextInt());
        }
        public Pair[] nextPairArr(int n) throws IOException{
            Pair[] arr=new Pair[n];
            for(int i=0; i<n; i++)
                arr[i]=nextPair();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    } Scanner StringTokenizer st; st BufferedReader br; br public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        } Scanner {
            br = new BufferedReader(new InputStreamReader(s));
        } br = new BufferedReader(new InputStreamReader(s)) br new BufferedReader(new InputStreamReader(s)) InputStream s s public Scanner(FileReader r) {
            br = new BufferedReader(r);
        } Scanner {
            br = new BufferedReader(r);
        } br = new BufferedReader(r) br new BufferedReader(r) FileReader r r public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        } while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() throws IOException {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() throws IOException {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public String nextLine() throws IOException {
            return br.readLine();
        } nextLine {
            return br.readLine();
        } return br.readLine(); br.readLine() br.readLine br public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        } nextArr {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        } int[] arr = new int[n]; arr new int[n] n for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt(); int i = 0; int i = 0; i 0 i < arr.length i arr.length arr arr.length i++ i++ i arr[i] = nextInt(); arr[i] = nextInt() arr[i] arr i nextInt() nextInt return arr; arr int n n public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        } nextsort {
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        } Integer[] arr=new Integer[n]; arr new Integer[n] n for(int i=0; i<n; i++)
                arr[i]=nextInt(); int i=0; int i=0; i 0 i<n i n i++ i++ i arr[i]=nextInt(); arr[i]=nextInt() arr[i] arr i nextInt() nextInt return arr; arr int n n public Pair nextPair() throws IOException{
            return new Pair(nextInt(), nextInt());
        } nextPair {
            return new Pair(nextInt(), nextInt());
        } return new Pair(nextInt(), nextInt()); new Pair(nextInt(), nextInt()) public Pair[] nextPairArr(int n) throws IOException{
            Pair[] arr=new Pair[n];
            for(int i=0; i<n; i++)
                arr[i]=nextPair();
            return arr;
        } nextPairArr {
            Pair[] arr=new Pair[n];
            for(int i=0; i<n; i++)
                arr[i]=nextPair();
            return arr;
        } Pair[] arr=new Pair[n]; arr new Pair[n] n for(int i=0; i<n; i++)
                arr[i]=nextPair(); int i=0; int i=0; i 0 i<n i n i++ i++ i arr[i]=nextPair(); arr[i]=nextPair() arr[i] arr i nextPair() nextPair return arr; arr int n n public boolean ready() throws IOException {
            return br.ready();
        } ready {
            return br.ready();
        } return br.ready(); br.ready() br.ready br static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x*1000+this.y);
        }
        public int compareTo(Pair p){
            int min1=Math.min(x, y), min2=Math.min(p.x, p.y);
            if(min1!=min2)
                return min1-min2;
            if(x==p.x)
                return y-p.y;
            return x-p.x;
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x==p.x && this.y==p.y;
        }
        public Pair clone(){
            return new Pair(x, y);
        }
        public String toString(){
            return this.x+" "+this.y;
        }
        public void add(Pair p){
            x+=p.x;
            y+=p.y;
        }
    } Pair int x; x int y; y public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        } Pair {
            this.x=x;
            this.y=y;
        } this.x=x this.x this this.x x this.y=y this.y this this.y y int x x int y y public int hashCode() {
            return (this.x*1000+this.y);
        } hashCode {
            return (this.x*1000+this.y);
        } return (this.x*1000+this.y); (this.x*1000+this.y) this.x*1000 this.x this this.x 1000 this.y this this.y public int compareTo(Pair p){
            int min1=Math.min(x, y), min2=Math.min(p.x, p.y);
            if(min1!=min2)
                return min1-min2;
            if(x==p.x)
                return y-p.y;
            return x-p.x;
        } compareTo {
            int min1=Math.min(x, y), min2=Math.min(p.x, p.y);
            if(min1!=min2)
                return min1-min2;
            if(x==p.x)
                return y-p.y;
            return x-p.x;
        } int min1=Math.min(x, y) min1 Math.min(x, y) Math.min Math x y min2=Math.min(p.x, p.y); min2 Math.min(p.x, p.y) Math.min Math p.x p p.x p.y p p.y if(min1!=min2)
                return min1-min2; min1!=min2 min1 min2 return min1-min2; min1-min2 min1 min2 if(x==p.x)
                return y-p.y; x==p.x x p.x p p.x return y-p.y; y-p.y y p.y p p.y return x-p.x; x-p.x x p.x p p.x Pair p p public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x==p.x && this.y==p.y;
        } equals {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x==p.x && this.y==p.y;
        } if (obj == null) {
                return false;
            } obj == null obj null {
                return false;
            } return false; false if (this.getClass() != obj.getClass()) {
                return false;
            } this.getClass() != obj.getClass() this.getClass() this.getClass this obj.getClass() obj.getClass obj {
                return false;
            } return false; false Pair p = (Pair) obj; p (Pair) obj return this.x==p.x && this.y==p.y; this.x==p.x && this.y==p.y this.x==p.x this.x this this.x p.x p p.x this.y==p.y this.y this this.y p.y p p.y Object obj obj public Pair clone(){
            return new Pair(x, y);
        } clone {
            return new Pair(x, y);
        } return new Pair(x, y); new Pair(x, y) public String toString(){
            return this.x+" "+this.y;
        } toString {
            return this.x+" "+this.y;
        } return this.x+" "+this.y; this.x+" "+this.y this.x+" "+this.y this.x this this.x " " this.y this this.y public void add(Pair p){
            x+=p.x;
            y+=p.y;
        } add {
            x+=p.x;
            y+=p.y;
        } x+=p.x x p.x p p.x y+=p.y y p.y p p.y Pair p p Comparable static class Union{
        int[] rep, size;
        int sets;
        public Union(int n){
            rep=new int[n];
            size=new int[n];
            sets=n;
            Arrays.fill(size, 1);
            for(int i=0; i<n; i++)
                rep[i]=i;
        }
        public void join(int x, int y){
            int a=getSet(x), b=getSet(y);
            if(a==b) return;
            sets--;
            if(size[a]>size[b]){
                rep[b]=a;
                size[a]+=size[b];
            }else{
                rep[a]=b;
                size[b]+=size[a];
            }
        }
        public int getSet(int x){
            if(rep[x]==x)
                return x;
            return rep[x]=getSet(rep[x]);
        }
    } Union int[] rep rep size; size int sets; sets public Union(int n){
            rep=new int[n];
            size=new int[n];
            sets=n;
            Arrays.fill(size, 1);
            for(int i=0; i<n; i++)
                rep[i]=i;
        } Union {
            rep=new int[n];
            size=new int[n];
            sets=n;
            Arrays.fill(size, 1);
            for(int i=0; i<n; i++)
                rep[i]=i;
        } rep=new int[n] rep new int[n] n size=new int[n] size new int[n] n sets=n sets n Arrays.fill(size, 1) Arrays.fill Arrays size 1 for(int i=0; i<n; i++)
                rep[i]=i; int i=0; int i=0; i 0 i<n i n i++ i++ i rep[i]=i; rep[i]=i rep[i] rep i i int n n public void join(int x, int y){
            int a=getSet(x), b=getSet(y);
            if(a==b) return;
            sets--;
            if(size[a]>size[b]){
                rep[b]=a;
                size[a]+=size[b];
            }else{
                rep[a]=b;
                size[b]+=size[a];
            }
        } join {
            int a=getSet(x), b=getSet(y);
            if(a==b) return;
            sets--;
            if(size[a]>size[b]){
                rep[b]=a;
                size[a]+=size[b];
            }else{
                rep[a]=b;
                size[b]+=size[a];
            }
        } int a=getSet(x) a getSet(x) getSet x b=getSet(y); b getSet(y) getSet y if(a==b) return; a==b a b return; sets-- sets if(size[a]>size[b]){
                rep[b]=a;
                size[a]+=size[b];
            }else{
                rep[a]=b;
                size[b]+=size[a];
            } size[a]>size[b] size[a] size a size[b] size b {
                rep[b]=a;
                size[a]+=size[b];
            } rep[b]=a rep[b] rep b a size[a]+=size[b] size[a] size a size[b] size b {
                rep[a]=b;
                size[b]+=size[a];
            } rep[a]=b rep[a] rep a b size[b]+=size[a] size[b] size b size[a] size a int x x int y y public int getSet(int x){
            if(rep[x]==x)
                return x;
            return rep[x]=getSet(rep[x]);
        } getSet {
            if(rep[x]==x)
                return x;
            return rep[x]=getSet(rep[x]);
        } if(rep[x]==x)
                return x; rep[x]==x rep[x] rep x x return x; x return rep[x]=getSet(rep[x]); rep[x]=getSet(rep[x]) rep[x] rep x getSet(rep[x]) getSet rep[x] rep x int x x public class Main {
    static PrintWriter pw;
    static Scanner sc;
    static char[] arr;
    static int[][] dp;
    static long ceildiv(long x, long y) { return (x+y-1)/y; }
    static int mod(long x, int m) { return (int)((x%m+m)%m); }
    static void put(TreeMap<Integer, Integer> map, Integer p){if(map.containsKey(p)) map.replace(p, map.get(p)+1); else map.put(p, 1); }
    static void rem(TreeMap<Integer, Integer> map, Integer p){ if(map.get(p)==1) map.remove(p);else map.replace(p, map.get(p)-1); }
    static long gcd(long x, long y) {return y==0?x:gcd(y, x%y);}
    static int Int(boolean x){ return x?1:0; }
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        pw=new PrintWriter(System.out);
        String s=sc.nextLine();
        int max=0;
        for(int i=0; i<3;){
            int x=0;
            while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            }
            max=Math.max(x, max);
            if(x==0)
                i++;
        }
        pw.println(max);
        pw.close();
    }
    static void printArr(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(long[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(Integer[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    }
    static void printArr(char[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i]==0? '1': arr[i]);
        pw.println();
    }
    static void printArr(ArrayList<Integer> list) {
        for (int i = 0; i < list.size(); i++)
            pw.print(list.get(i)+" ");
        pw.println();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public Pair nextPair() throws IOException{
            return new Pair(nextInt(), nextInt());
        }
        public Pair[] nextPairArr(int n) throws IOException{
            Pair[] arr=new Pair[n];
            for(int i=0; i<n; i++)
                arr[i]=nextPair();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x*1000+this.y);
        }
        public int compareTo(Pair p){
            int min1=Math.min(x, y), min2=Math.min(p.x, p.y);
            if(min1!=min2)
                return min1-min2;
            if(x==p.x)
                return y-p.y;
            return x-p.x;
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x==p.x && this.y==p.y;
        }
        public Pair clone(){
            return new Pair(x, y);
        }
        public String toString(){
            return this.x+" "+this.y;
        }
        public void add(Pair p){
            x+=p.x;
            y+=p.y;
        }
    }
    static class Union{
        int[] rep, size;
        int sets;
        public Union(int n){
            rep=new int[n];
            size=new int[n];
            sets=n;
            Arrays.fill(size, 1);
            for(int i=0; i<n; i++)
                rep[i]=i;
        }
        public void join(int x, int y){
            int a=getSet(x), b=getSet(y);
            if(a==b) return;
            sets--;
            if(size[a]>size[b]){
                rep[b]=a;
                size[a]+=size[b];
            }else{
                rep[a]=b;
                size[b]+=size[a];
            }
        }
        public int getSet(int x){
            if(rep[x]==x)
                return x;
            return rep[x]=getSet(rep[x]);
        }
    }
} public class Main {
    static PrintWriter pw;
    static Scanner sc;
    static char[] arr;
    static int[][] dp;
    static long ceildiv(long x, long y) { return (x+y-1)/y; }
    static int mod(long x, int m) { return (int)((x%m+m)%m); }
    static void put(TreeMap<Integer, Integer> map, Integer p){if(map.containsKey(p)) map.replace(p, map.get(p)+1); else map.put(p, 1); }
    static void rem(TreeMap<Integer, Integer> map, Integer p){ if(map.get(p)==1) map.remove(p);else map.replace(p, map.get(p)-1); }
    static long gcd(long x, long y) {return y==0?x:gcd(y, x%y);}
    static int Int(boolean x){ return x?1:0; }
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        pw=new PrintWriter(System.out);
        String s=sc.nextLine();
        int max=0;
        for(int i=0; i<3;){
            int x=0;
            while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            }
            max=Math.max(x, max);
            if(x==0)
                i++;
        }
        pw.println(max);
        pw.close();
    }
    static void printArr(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(long[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(Integer[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    }
    static void printArr(char[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i]==0? '1': arr[i]);
        pw.println();
    }
    static void printArr(ArrayList<Integer> list) {
        for (int i = 0; i < list.size(); i++)
            pw.print(list.get(i)+" ");
        pw.println();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public Pair nextPair() throws IOException{
            return new Pair(nextInt(), nextInt());
        }
        public Pair[] nextPairArr(int n) throws IOException{
            Pair[] arr=new Pair[n];
            for(int i=0; i<n; i++)
                arr[i]=nextPair();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x*1000+this.y);
        }
        public int compareTo(Pair p){
            int min1=Math.min(x, y), min2=Math.min(p.x, p.y);
            if(min1!=min2)
                return min1-min2;
            if(x==p.x)
                return y-p.y;
            return x-p.x;
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x==p.x && this.y==p.y;
        }
        public Pair clone(){
            return new Pair(x, y);
        }
        public String toString(){
            return this.x+" "+this.y;
        }
        public void add(Pair p){
            x+=p.x;
            y+=p.y;
        }
    }
    static class Union{
        int[] rep, size;
        int sets;
        public Union(int n){
            rep=new int[n];
            size=new int[n];
            sets=n;
            Arrays.fill(size, 1);
            for(int i=0; i<n; i++)
                rep[i]=i;
        }
        public void join(int x, int y){
            int a=getSet(x), b=getSet(y);
            if(a==b) return;
            sets--;
            if(size[a]>size[b]){
                rep[b]=a;
                size[a]+=size[b];
            }else{
                rep[a]=b;
                size[b]+=size[a];
            }
        }
        public int getSet(int x){
            if(rep[x]==x)
                return x;
            return rep[x]=getSet(rep[x]);
        }
    }
} Main
import java.io.*;
import java.util.*;

public class Main {
    static PrintWriter pw;
    static Scanner sc;
    static char[] arr;
    static int[][] dp;
    static long ceildiv(long x, long y) { return (x+y-1)/y; }
    static int mod(long x, int m) { return (int)((x%m+m)%m); }
    static void put(TreeMap<Integer, Integer> map, Integer p){if(map.containsKey(p)) map.replace(p, map.get(p)+1); else map.put(p, 1); }
    static void rem(TreeMap<Integer, Integer> map, Integer p){ if(map.get(p)==1) map.remove(p);else map.replace(p, map.get(p)-1); }
    static long gcd(long x, long y) {return y==0?x:gcd(y, x%y);}
    static int Int(boolean x){ return x?1:0; }
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        pw=new PrintWriter(System.out);
        String s=sc.nextLine();
        int max=0;
        for(int i=0; i<3;){
            int x=0;
            while(i<3 && s.charAt(i)=='R'){
                x++;
                i++;
            }
            max=Math.max(x, max);
            if(x==0)
                i++;
        }
        pw.println(max);
        pw.close();
    }
    static void printArr(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(long[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(Integer[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    }
    static void printArr(char[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i]==0? '1': arr[i]);
        pw.println();
    }
    static void printArr(ArrayList<Integer> list) {
        for (int i = 0; i < list.size(); i++)
            pw.print(list.get(i)+" ");
        pw.println();
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public Pair nextPair() throws IOException{
            return new Pair(nextInt(), nextInt());
        }
        public Pair[] nextPairArr(int n) throws IOException{
            Pair[] arr=new Pair[n];
            for(int i=0; i<n; i++)
                arr[i]=nextPair();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return (this.x*1000+this.y);
        }
        public int compareTo(Pair p){
            int min1=Math.min(x, y), min2=Math.min(p.x, p.y);
            if(min1!=min2)
                return min1-min2;
            if(x==p.x)
                return y-p.y;
            return x-p.x;
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x==p.x && this.y==p.y;
        }
        public Pair clone(){
            return new Pair(x, y);
        }
        public String toString(){
            return this.x+" "+this.y;
        }
        public void add(Pair p){
            x+=p.x;
            y+=p.y;
        }
    }
    static class Union{
        int[] rep, size;
        int sets;
        public Union(int n){
            rep=new int[n];
            size=new int[n];
            sets=n;
            Arrays.fill(size, 1);
            for(int i=0; i<n; i++)
                rep[i]=i;
        }
        public void join(int x, int y){
            int a=getSet(x), b=getSet(y);
            if(a==b) return;
            sets--;
            if(size[a]>size[b]){
                rep[b]=a;
                size[a]+=size[b];
            }else{
                rep[a]=b;
                size[b]+=size[a];
            }
        }
        public int getSet(int x){
            if(rep[x]==x)
                return x;
            return rep[x]=getSet(rep[x]);
        }
    }
}