import java.util.Scanner;

public class Main{
  public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  String esu = scanner.next();
  int raincnt = 0;
  int rainrec = 0;
  for(int i=0;i<3;i++){
    if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    }
  }

    if(raincnt>rainrec){
      System.out.println(raincnt);
      }else{
      System.out.println(rainrec);
      }
  }
}
 import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  String esu = scanner.next();
  int raincnt = 0;
  int rainrec = 0;
  for(int i=0;i<3;i++){
    if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    }
  }

    if(raincnt>rainrec){
      System.out.println(raincnt);
      }else{
      System.out.println(rainrec);
      }
  }
} Main public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  String esu = scanner.next();
  int raincnt = 0;
  int rainrec = 0;
  for(int i=0;i<3;i++){
    if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    }
  }

    if(raincnt>rainrec){
      System.out.println(raincnt);
      }else{
      System.out.println(rainrec);
      }
  } main {
  Scanner scanner = new Scanner(System.in);
  String esu = scanner.next();
  int raincnt = 0;
  int rainrec = 0;
  for(int i=0;i<3;i++){
    if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    }
  }

    if(raincnt>rainrec){
      System.out.println(raincnt);
      }else{
      System.out.println(rainrec);
      }
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String esu = scanner.next(); esu scanner.next() scanner.next scanner int raincnt = 0; raincnt 0 int rainrec = 0; rainrec 0 for(int i=0;i<3;i++){
    if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    }
  } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
    if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    }
  } {
    if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    }
  } if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    } esu.charAt(i)=='R' esu.charAt(i) esu.charAt esu i 'R' {    
      raincnt++;
    } raincnt++ raincnt {
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    } if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      } raincnt>rainrec raincnt rainrec {
      rainrec = raincnt;
      } rainrec = raincnt rainrec raincnt {
      } raincnt = 0 raincnt 0 if(raincnt>rainrec){
      System.out.println(raincnt);
      }else{
      System.out.println(rainrec);
      } raincnt>rainrec raincnt rainrec {
      System.out.println(raincnt);
      } System.out.println(raincnt) System.out.println System.out System System.out raincnt {
      System.out.println(rainrec);
      } System.out.println(rainrec) System.out.println System.out System System.out rainrec String args[] args public class Main{
  public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  String esu = scanner.next();
  int raincnt = 0;
  int rainrec = 0;
  for(int i=0;i<3;i++){
    if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    }
  }

    if(raincnt>rainrec){
      System.out.println(raincnt);
      }else{
      System.out.println(rainrec);
      }
  }
} public class Main{
  public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  String esu = scanner.next();
  int raincnt = 0;
  int rainrec = 0;
  for(int i=0;i<3;i++){
    if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    }
  }

    if(raincnt>rainrec){
      System.out.println(raincnt);
      }else{
      System.out.println(rainrec);
      }
  }
} Main
import java.util.Scanner;

public class Main{
  public static void main(String args[]){
  Scanner scanner = new Scanner(System.in);
  String esu = scanner.next();
  int raincnt = 0;
  int rainrec = 0;
  for(int i=0;i<3;i++){
    if(esu.charAt(i)=='R'){    
      raincnt++;
    }else{
      if(raincnt>rainrec){
      rainrec = raincnt;
      }else{
      }
      raincnt = 0;
 
    }
  }

    if(raincnt>rainrec){
      System.out.println(raincnt);
      }else{
      System.out.println(rainrec);
      }
  }
}

