import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    System.out.println(solve(sc.next()));
  }
  static int solve(String s){
    if(s.contains("RRR")){
      return 3;
    } else if(s.contains("RR")){
      return 2;
    } else if(s.contains("R")){
      return 1;
    } else {
      return 0;
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    System.out.println(solve(sc.next()));
  }
  static int solve(String s){
    if(s.contains("RRR")){
      return 3;
    } else if(s.contains("RR")){
      return 2;
    } else if(s.contains("R")){
      return 1;
    } else {
      return 0;
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    System.out.println(solve(sc.next()));
  } main {
    Scanner sc = new Scanner(System.in);
    System.out.println(solve(sc.next()));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) System.out.println(solve(sc.next())) System.out.println System.out System System.out solve(sc.next()) solve sc.next() sc.next sc String[] args args static int solve(String s){
    if(s.contains("RRR")){
      return 3;
    } else if(s.contains("RR")){
      return 2;
    } else if(s.contains("R")){
      return 1;
    } else {
      return 0;
    }
  } solve {
    if(s.contains("RRR")){
      return 3;
    } else if(s.contains("RR")){
      return 2;
    } else if(s.contains("R")){
      return 1;
    } else {
      return 0;
    }
  } if(s.contains("RRR")){
      return 3;
    } else if(s.contains("RR")){
      return 2;
    } else if(s.contains("R")){
      return 1;
    } else {
      return 0;
    } s.contains("RRR") s.contains s "RRR" {
      return 3;
    } return 3; 3 if(s.contains("RR")){
      return 2;
    } else if(s.contains("R")){
      return 1;
    } else {
      return 0;
    } s.contains("RR") s.contains s "RR" {
      return 2;
    } return 2; 2 if(s.contains("R")){
      return 1;
    } else {
      return 0;
    } s.contains("R") s.contains s "R" {
      return 1;
    } return 1; 1 {
      return 0;
    } return 0; 0 String s s public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    System.out.println(solve(sc.next()));
  }
  static int solve(String s){
    if(s.contains("RRR")){
      return 3;
    } else if(s.contains("RR")){
      return 2;
    } else if(s.contains("R")){
      return 1;
    } else {
      return 0;
    }
  }
} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    System.out.println(solve(sc.next()));
  }
  static int solve(String s){
    if(s.contains("RRR")){
      return 3;
    } else if(s.contains("RR")){
      return 2;
    } else if(s.contains("R")){
      return 1;
    } else {
      return 0;
    }
  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    System.out.println(solve(sc.next()));
  }
  static int solve(String s){
    if(s.contains("RRR")){
      return 3;
    } else if(s.contains("RR")){
      return 2;
    } else if(s.contains("R")){
      return 1;
    } else {
      return 0;
    }
  }
}
