import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String data = scan.next();
    int max=0, i=0;
    for(int j=0;j<3;j++){
     if(data.charAt(j)=='R')i++;
     else i=0;
     if(i>max)max=i;
    }
    System.out.println(""+max);
  }
  
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String data = scan.next();
    int max=0, i=0;
    for(int j=0;j<3;j++){
     if(data.charAt(j)=='R')i++;
     else i=0;
     if(i>max)max=i;
    }
    System.out.println(""+max);
  }
  
} Main public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String data = scan.next();
    int max=0, i=0;
    for(int j=0;j<3;j++){
     if(data.charAt(j)=='R')i++;
     else i=0;
     if(i>max)max=i;
    }
    System.out.println(""+max);
  } main {
    Scanner scan = new Scanner(System.in);
    String data = scan.next();
    int max=0, i=0;
    for(int j=0;j<3;j++){
     if(data.charAt(j)=='R')i++;
     else i=0;
     if(i>max)max=i;
    }
    System.out.println(""+max);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String data = scan.next(); data scan.next() scan.next scan int max=0 max 0 i=0; i 0 for(int j=0;j<3;j++){
     if(data.charAt(j)=='R')i++;
     else i=0;
     if(i>max)max=i;
    } int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
     if(data.charAt(j)=='R')i++;
     else i=0;
     if(i>max)max=i;
    } {
     if(data.charAt(j)=='R')i++;
     else i=0;
     if(i>max)max=i;
    } if(data.charAt(j)=='R')i++;
     else i=0; data.charAt(j)=='R' data.charAt(j) data.charAt data j 'R' i++ i i=0 i 0 if(i>max)max=i; i>max i max max=i max i System.out.println(""+max) System.out.println System.out System System.out ""+max "" max String[] args args public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String data = scan.next();
    int max=0, i=0;
    for(int j=0;j<3;j++){
     if(data.charAt(j)=='R')i++;
     else i=0;
     if(i>max)max=i;
    }
    System.out.println(""+max);
  }
  
} public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String data = scan.next();
    int max=0, i=0;
    for(int j=0;j<3;j++){
     if(data.charAt(j)=='R')i++;
     else i=0;
     if(i>max)max=i;
    }
    System.out.println(""+max);
  }
  
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String data = scan.next();
    int max=0, i=0;
    for(int j=0;j<3;j++){
     if(data.charAt(j)=='R')i++;
     else i=0;
     if(i>max)max=i;
    }
    System.out.println(""+max);
  }
  
}