import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String line = sc.nextLine();
    String data[] = line.split("");
    int count = 0;
    int n = 0;
    int flag = 0;
    int max = 0;
    while(n < data.length){
      if(data[n].equals("R")){
        count++;
        if(max < count){
          max = count;
        }
      }
      else{
        count = 0;
      }
      n++;
    }
    System.out.println(max);
  }
}
       import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String line = sc.nextLine();
    String data[] = line.split("");
    int count = 0;
    int n = 0;
    int flag = 0;
    int max = 0;
    while(n < data.length){
      if(data[n].equals("R")){
        count++;
        if(max < count){
          max = count;
        }
      }
      else{
        count = 0;
      }
      n++;
    }
    System.out.println(max);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String line = sc.nextLine();
    String data[] = line.split("");
    int count = 0;
    int n = 0;
    int flag = 0;
    int max = 0;
    while(n < data.length){
      if(data[n].equals("R")){
        count++;
        if(max < count){
          max = count;
        }
      }
      else{
        count = 0;
      }
      n++;
    }
    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    String line = sc.nextLine();
    String data[] = line.split("");
    int count = 0;
    int n = 0;
    int flag = 0;
    int max = 0;
    while(n < data.length){
      if(data[n].equals("R")){
        count++;
        if(max < count){
          max = count;
        }
      }
      else{
        count = 0;
      }
      n++;
    }
    System.out.println(max);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String data[] = line.split(""); data line.split("") line.split line "" int count = 0; count 0 int n = 0; n 0 int flag = 0; flag 0 int max = 0; max 0 while(n < data.length){
      if(data[n].equals("R")){
        count++;
        if(max < count){
          max = count;
        }
      }
      else{
        count = 0;
      }
      n++;
    } n < data.length n data.length data data.length {
      if(data[n].equals("R")){
        count++;
        if(max < count){
          max = count;
        }
      }
      else{
        count = 0;
      }
      n++;
    } if(data[n].equals("R")){
        count++;
        if(max < count){
          max = count;
        }
      }
      else{
        count = 0;
      } data[n].equals("R") data[n].equals data[n] data n "R" {
        count++;
        if(max < count){
          max = count;
        }
      } count++ count if(max < count){
          max = count;
        } max < count max count {
          max = count;
        } max = count max count {
        count = 0;
      } count = 0 count 0 n++ n System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String line = sc.nextLine();
    String data[] = line.split("");
    int count = 0;
    int n = 0;
    int flag = 0;
    int max = 0;
    while(n < data.length){
      if(data[n].equals("R")){
        count++;
        if(max < count){
          max = count;
        }
      }
      else{
        count = 0;
      }
      n++;
    }
    System.out.println(max);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String line = sc.nextLine();
    String data[] = line.split("");
    int count = 0;
    int n = 0;
    int flag = 0;
    int max = 0;
    while(n < data.length){
      if(data[n].equals("R")){
        count++;
        if(max < count){
          max = count;
        }
      }
      else{
        count = 0;
      }
      n++;
    }
    System.out.println(max);
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String line = sc.nextLine();
    String data[] = line.split("");
    int count = 0;
    int n = 0;
    int flag = 0;
    int max = 0;
    while(n < data.length){
      if(data[n].equals("R")){
        count++;
        if(max < count){
          max = count;
        }
      }
      else{
        count = 0;
      }
      n++;
    }
    System.out.println(max);
  }
}
      