import java.util.Scanner;
 
public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String t = scan.next();
    int maxCnt = 0;
    int currentCnt = 0;
    for (int i = 0; i < t.length(); i++){
      if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      }
      maxCnt = Math.max(maxCnt, currentCnt);
    }
    System.out.println(maxCnt);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String t = scan.next();
    int maxCnt = 0;
    int currentCnt = 0;
    for (int i = 0; i < t.length(); i++){
      if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      }
      maxCnt = Math.max(maxCnt, currentCnt);
    }
    System.out.println(maxCnt);
  }
} Main public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String t = scan.next();
    int maxCnt = 0;
    int currentCnt = 0;
    for (int i = 0; i < t.length(); i++){
      if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      }
      maxCnt = Math.max(maxCnt, currentCnt);
    }
    System.out.println(maxCnt);
  } main {
    Scanner scan = new Scanner(System.in);
    String t = scan.next();
    int maxCnt = 0;
    int currentCnt = 0;
    for (int i = 0; i < t.length(); i++){
      if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      }
      maxCnt = Math.max(maxCnt, currentCnt);
    }
    System.out.println(maxCnt);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String t = scan.next(); t scan.next() scan.next scan int maxCnt = 0; maxCnt 0 int currentCnt = 0; currentCnt 0 for (int i = 0; i < t.length(); i++){
      if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      }
      maxCnt = Math.max(maxCnt, currentCnt);
    } int i = 0; int i = 0; i 0 i < t.length() i t.length() t.length t i++ i++ i {
      if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      }
      maxCnt = Math.max(maxCnt, currentCnt);
    } {
      if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      }
      maxCnt = Math.max(maxCnt, currentCnt);
    } if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      } t.charAt(i) == 'R' t.charAt(i) t.charAt t i 'R' {
        currentCnt++;
      } currentCnt++ currentCnt {
        currentCnt = 0;
      } currentCnt = 0 currentCnt 0 maxCnt = Math.max(maxCnt, currentCnt) maxCnt Math.max(maxCnt, currentCnt) Math.max Math maxCnt currentCnt System.out.println(maxCnt) System.out.println System.out System System.out maxCnt String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String t = scan.next();
    int maxCnt = 0;
    int currentCnt = 0;
    for (int i = 0; i < t.length(); i++){
      if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      }
      maxCnt = Math.max(maxCnt, currentCnt);
    }
    System.out.println(maxCnt);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String t = scan.next();
    int maxCnt = 0;
    int currentCnt = 0;
    for (int i = 0; i < t.length(); i++){
      if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      }
      maxCnt = Math.max(maxCnt, currentCnt);
    }
    System.out.println(maxCnt);
  }
} Main
import java.util.Scanner;
 
public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String t = scan.next();
    int maxCnt = 0;
    int currentCnt = 0;
    for (int i = 0; i < t.length(); i++){
      if(t.charAt(i) == 'R'){
        currentCnt++;
      }else{
        currentCnt = 0;
      }
      maxCnt = Math.max(maxCnt, currentCnt);
    }
    System.out.println(maxCnt);
  }
}