import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.nextLine();
    int ans = 0;
    int max = 0;

    for(int i=0; i<s.length(); i++){
      if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      }
    }
    
    System.out.println(Math.max(ans,max));
   
    scanner.close();
    return;
  }
  
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.nextLine();
    int ans = 0;
    int max = 0;

    for(int i=0; i<s.length(); i++){
      if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      }
    }
    
    System.out.println(Math.max(ans,max));
   
    scanner.close();
    return;
  }
  
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.nextLine();
    int ans = 0;
    int max = 0;

    for(int i=0; i<s.length(); i++){
      if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      }
    }
    
    System.out.println(Math.max(ans,max));
   
    scanner.close();
    return;
  } main {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.nextLine();
    int ans = 0;
    int max = 0;

    for(int i=0; i<s.length(); i++){
      if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      }
    }
    
    System.out.println(Math.max(ans,max));
   
    scanner.close();
    return;
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.nextLine(); s scanner.nextLine() scanner.nextLine scanner int ans = 0; ans 0 int max = 0; max 0 for(int i=0; i<s.length(); i++){
      if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      }
    } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
      if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      }
    } {
      if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      }
    } if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      } s.charAt(i) == 'R' s.charAt(i) s.charAt s i 'R' {
        ans ++;
      } ans ++ ans {
        max = Math.max(ans,max);
        ans = 0;
      } max = Math.max(ans,max) max Math.max(ans,max) Math.max Math ans max ans = 0 ans 0 System.out.println(Math.max(ans,max)) System.out.println System.out System System.out Math.max(ans,max) Math.max Math ans max scanner.close() scanner.close scanner return; String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.nextLine();
    int ans = 0;
    int max = 0;

    for(int i=0; i<s.length(); i++){
      if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      }
    }
    
    System.out.println(Math.max(ans,max));
   
    scanner.close();
    return;
  }
  
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.nextLine();
    int ans = 0;
    int max = 0;

    for(int i=0; i<s.length(); i++){
      if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      }
    }
    
    System.out.println(Math.max(ans,max));
   
    scanner.close();
    return;
  }
  
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String s = scanner.nextLine();
    int ans = 0;
    int max = 0;

    for(int i=0; i<s.length(); i++){
      if(s.charAt(i) == 'R'){
        ans ++;
      }else{
        max = Math.max(ans,max);
        ans = 0;
      }
    }
    
    System.out.println(Math.max(ans,max));
   
    scanner.close();
    return;
  }
  
}
