import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String s = sc.next();
     
      	String str[] = new String[3];
          str[0] = s.substring(0,1);
      		str[1] = s.substring(1,2);
      str[2] = s.substring(2,3);
          
      int min = 0;
      int c = 0;
      for(int i=0;i<3;i++){
        if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        }
      }
        
        if(c> min) min = c;
        System.out.println(min);
      
      }
}
 import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String s = sc.next();
     
      	String str[] = new String[3];
          str[0] = s.substring(0,1);
      		str[1] = s.substring(1,2);
      str[2] = s.substring(2,3);
          
      int min = 0;
      int c = 0;
      for(int i=0;i<3;i++){
        if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        }
      }
        
        if(c> min) min = c;
        System.out.println(min);
      
      }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String s = sc.next();
     
      	String str[] = new String[3];
          str[0] = s.substring(0,1);
      		str[1] = s.substring(1,2);
      str[2] = s.substring(2,3);
          
      int min = 0;
      int c = 0;
      for(int i=0;i<3;i++){
        if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        }
      }
        
        if(c> min) min = c;
        System.out.println(min);
      
      } main {
		Scanner sc = new Scanner(System.in);
      	String s = sc.next();
     
      	String str[] = new String[3];
          str[0] = s.substring(0,1);
      		str[1] = s.substring(1,2);
      str[2] = s.substring(2,3);
          
      int min = 0;
      int c = 0;
      for(int i=0;i<3;i++){
        if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        }
      }
        
        if(c> min) min = c;
        System.out.println(min);
      
      } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String str[] = new String[3]; str new String[3] 3 str[0] = s.substring(0,1) str[0] str 0 s.substring(0,1) s.substring s 0 1 str[1] = s.substring(1,2) str[1] str 1 s.substring(1,2) s.substring s 1 2 str[2] = s.substring(2,3) str[2] str 2 s.substring(2,3) s.substring s 2 3 int min = 0; min 0 int c = 0; c 0 for(int i=0;i<3;i++){
        if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        }
      } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
        if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        }
      } {
        if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        }
      } if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        } "R".equals(str[i]) "R".equals "R" str[i] str i {
          c++;
        } c++ c {
          if(c>min) {
            min = c;
            c = 0;
          }
        } if(c>min) {
            min = c;
            c = 0;
          } c>min c min {
            min = c;
            c = 0;
          } min = c min c c = 0 c 0 if(c> min) min = c; c> min c min min = c min c System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String s = sc.next();
     
      	String str[] = new String[3];
          str[0] = s.substring(0,1);
      		str[1] = s.substring(1,2);
      str[2] = s.substring(2,3);
          
      int min = 0;
      int c = 0;
      for(int i=0;i<3;i++){
        if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        }
      }
        
        if(c> min) min = c;
        System.out.println(min);
      
      }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String s = sc.next();
     
      	String str[] = new String[3];
          str[0] = s.substring(0,1);
      		str[1] = s.substring(1,2);
      str[2] = s.substring(2,3);
          
      int min = 0;
      int c = 0;
      for(int i=0;i<3;i++){
        if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        }
      }
        
        if(c> min) min = c;
        System.out.println(min);
      
      }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String s = sc.next();
     
      	String str[] = new String[3];
          str[0] = s.substring(0,1);
      		str[1] = s.substring(1,2);
      str[2] = s.substring(2,3);
          
      int min = 0;
      int c = 0;
      for(int i=0;i<3;i++){
        if("R".equals(str[i])){
          c++;
        }else{
          if(c>min) {
            min = c;
            c = 0;
          }
        }
      }
        
        if(c> min) min = c;
        System.out.println(min);
      
      }
}

