import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    int r;
    
    if (S.indexOf("RRR") != -1) {
      r = 3;
    }else if (S.indexOf("RR")  != -1) {
      r = 2;
    }else if (S.indexOf('R') != -1) {
      r = 1;
    }else{
      r = 0;
    }
    
    System.out.println(r);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    int r;
    
    if (S.indexOf("RRR") != -1) {
      r = 3;
    }else if (S.indexOf("RR")  != -1) {
      r = 2;
    }else if (S.indexOf('R') != -1) {
      r = 1;
    }else{
      r = 0;
    }
    
    System.out.println(r);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    int r;
    
    if (S.indexOf("RRR") != -1) {
      r = 3;
    }else if (S.indexOf("RR")  != -1) {
      r = 2;
    }else if (S.indexOf('R') != -1) {
      r = 1;
    }else{
      r = 0;
    }
    
    System.out.println(r);
  } main {
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    int r;
    
    if (S.indexOf("RRR") != -1) {
      r = 3;
    }else if (S.indexOf("RR")  != -1) {
      r = 2;
    }else if (S.indexOf('R') != -1) {
      r = 1;
    }else{
      r = 0;
    }
    
    System.out.println(r);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int r; r if (S.indexOf("RRR") != -1) {
      r = 3;
    }else if (S.indexOf("RR")  != -1) {
      r = 2;
    }else if (S.indexOf('R') != -1) {
      r = 1;
    }else{
      r = 0;
    } S.indexOf("RRR") != -1 S.indexOf("RRR") S.indexOf S "RRR" -1 1 {
      r = 3;
    } r = 3 r 3 if (S.indexOf("RR")  != -1) {
      r = 2;
    }else if (S.indexOf('R') != -1) {
      r = 1;
    }else{
      r = 0;
    } S.indexOf("RR")  != -1 S.indexOf("RR") S.indexOf S "RR" -1 1 {
      r = 2;
    } r = 2 r 2 if (S.indexOf('R') != -1) {
      r = 1;
    }else{
      r = 0;
    } S.indexOf('R') != -1 S.indexOf('R') S.indexOf S 'R' -1 1 {
      r = 1;
    } r = 1 r 1 {
      r = 0;
    } r = 0 r 0 System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    int r;
    
    if (S.indexOf("RRR") != -1) {
      r = 3;
    }else if (S.indexOf("RR")  != -1) {
      r = 2;
    }else if (S.indexOf('R') != -1) {
      r = 1;
    }else{
      r = 0;
    }
    
    System.out.println(r);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    int r;
    
    if (S.indexOf("RRR") != -1) {
      r = 3;
    }else if (S.indexOf("RR")  != -1) {
      r = 2;
    }else if (S.indexOf('R') != -1) {
      r = 1;
    }else{
      r = 0;
    }
    
    System.out.println(r);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    int r;
    
    if (S.indexOf("RRR") != -1) {
      r = 3;
    }else if (S.indexOf("RR")  != -1) {
      r = 2;
    }else if (S.indexOf('R') != -1) {
      r = 1;
    }else{
      r = 0;
    }
    
    System.out.println(r);
  }
}