import java.util.*;


import java.io.*;
/**
 * MLASERP
 */
public class Main {

    
    static MyScanner in  = new MyScanner();
   static int mod  = 1000000007;
    static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      static StringTokenizer st;
      static int []dr  = {1,-1,0,0};
      static int [] dc = {0,0,-1,1};
public static void main(String[] args) {
    String s = in.next();
    int max =0;
    int n= s.length();
    int length =0;
    for(int i=0;i<n;i++){
        if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        }
    }
    out.println(max);

   out.flush();
   

}
static int rcToxy(int r, int c,int W){
    return r*W+c;
}
static class Node{
    int r, c,prev,change;
    Node(int r, int c){
        this.r =r ;
        this.c = c;
    }
}
public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      }

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

    
    static MyScanner in  = new MyScanner();
   static int mod  = 1000000007;
    static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      static StringTokenizer st;
      static int []dr  = {1,-1,0,0};
      static int [] dc = {0,0,-1,1};
public static void main(String[] args) {
    String s = in.next();
    int max =0;
    int n= s.length();
    int length =0;
    for(int i=0;i<n;i++){
        if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        }
    }
    out.println(max);

   out.flush();
   

}
static int rcToxy(int r, int c,int W){
    return r*W+c;
}
static class Node{
    int r, c,prev,change;
    Node(int r, int c){
        this.r =r ;
        this.c = c;
    }
}
public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
} Main static MyScanner in  = new MyScanner(); in new MyScanner() static int mod  = 1000000007; mod 1000000007 static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); out new PrintWriter(new OutputStreamWriter(System.out)) static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) static StringTokenizer st; st static int []dr  = {1,-1,0,0}; dr {1,-1,0,0} 1 -1 1 0 0 static int [] dc = {0,0,-1,1}; dc {0,0,-1,1} 0 0 -1 1 1 public static void main(String[] args) {
    String s = in.next();
    int max =0;
    int n= s.length();
    int length =0;
    for(int i=0;i<n;i++){
        if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        }
    }
    out.println(max);

   out.flush();
   

} main {
    String s = in.next();
    int max =0;
    int n= s.length();
    int length =0;
    for(int i=0;i<n;i++){
        if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        }
    }
    out.println(max);

   out.flush();
   

} String s = in.next(); s in.next() in.next in int max =0; max 0 int n= s.length(); n s.length() s.length s int length =0; length 0 for(int i=0;i<n;i++){
        if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        }
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        }
    } {
        if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        }
    } if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        } s.charAt(i)=='R' s.charAt(i) s.charAt s i 'R' {
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        } int j= i; j i while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            } j<s.length()&&s.charAt(j)=='R' j<s.length() j s.length() s.length s s.charAt(j)=='R' s.charAt(j) s.charAt s j 'R' {
                length++;
                j++;
            } length++ length j++ j max = Math.max(length, max) max Math.max(length, max) Math.max Math length max length = 0 length 0 out.println(max) out.println out max out.flush() out.flush out String[] args args static int rcToxy(int r, int c,int W){
    return r*W+c;
} rcToxy {
    return r*W+c;
} return r*W+c; r*W+c r*W r W c int r r int c c int W W static class Node{
    int r, c,prev,change;
    Node(int r, int c){
        this.r =r ;
        this.c = c;
    }
} Node int r r c c prev prev change; change Node(int r, int c){
        this.r =r ;
        this.c = c;
    } Node {
        this.r =r ;
        this.c = c;
    } this.r =r this.r this this.r r this.c = c this.c this this.c c int r r int c c public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      }

   } MyScanner BufferedReader br; br StringTokenizer st; st public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      } MyScanner {
         br = new BufferedReader(new InputStreamReader(System.in));
      } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) 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 int nextInt() {
          return Integer.parseInt(next());
      } nextInt {
          return Integer.parseInt(next());
      } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
          return Long.parseLong(next());
      } nextLong {
          return Long.parseLong(next());
      } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
          return Double.parseDouble(next());
      } nextDouble {
          return Double.parseDouble(next());
      } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      } nextLine {
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      } String str = ""; str "" try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  } catch (IOException e) {
	     e.printStackTrace();
	  } IOException e {
	     e.printStackTrace();
	  } e.printStackTrace() e.printStackTrace e {
	     str = br.readLine();
	  } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {

    
    static MyScanner in  = new MyScanner();
   static int mod  = 1000000007;
    static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      static StringTokenizer st;
      static int []dr  = {1,-1,0,0};
      static int [] dc = {0,0,-1,1};
public static void main(String[] args) {
    String s = in.next();
    int max =0;
    int n= s.length();
    int length =0;
    for(int i=0;i<n;i++){
        if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        }
    }
    out.println(max);

   out.flush();
   

}
static int rcToxy(int r, int c,int W){
    return r*W+c;
}
static class Node{
    int r, c,prev,change;
    Node(int r, int c){
        this.r =r ;
        this.c = c;
    }
}
public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
} public class Main {

    
    static MyScanner in  = new MyScanner();
   static int mod  = 1000000007;
    static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      static StringTokenizer st;
      static int []dr  = {1,-1,0,0};
      static int [] dc = {0,0,-1,1};
public static void main(String[] args) {
    String s = in.next();
    int max =0;
    int n= s.length();
    int length =0;
    for(int i=0;i<n;i++){
        if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        }
    }
    out.println(max);

   out.flush();
   

}
static int rcToxy(int r, int c,int W){
    return r*W+c;
}
static class Node{
    int r, c,prev,change;
    Node(int r, int c){
        this.r =r ;
        this.c = c;
    }
}
public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
} Main
import java.util.*;


import java.io.*;
/**
 * MLASERP
 */
public class Main {

    
    static MyScanner in  = new MyScanner();
   static int mod  = 1000000007;
    static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      static StringTokenizer st;
      static int []dr  = {1,-1,0,0};
      static int [] dc = {0,0,-1,1};
public static void main(String[] args) {
    String s = in.next();
    int max =0;
    int n= s.length();
    int length =0;
    for(int i=0;i<n;i++){
        if(s.charAt(i)=='R'){
            int j= i;
            while(j<s.length()&&s.charAt(j)=='R'){
                length++;
                j++;
            }
            max = Math.max(length, max);
            length = 0;
        }
    }
    out.println(max);

   out.flush();
   

}
static int rcToxy(int r, int c,int W){
    return r*W+c;
}
static class Node{
    int r, c,prev,change;
    Node(int r, int c){
        this.r =r ;
        this.c = c;
    }
}
public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      }

   }
}