import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int count = 0;
    int ans = 0;

    for(int i=0 ; i<3 ; i++){
      if(s.charAt(i) == 'R'){
        count++;
      }else{
        count = 0;
      }
      ans = Math.max(count,ans);
    }
    System.out.println(ans);
  }
} 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 count = 0;
    int ans = 0;

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

    for(int i=0 ; i<3 ; i++){
      if(s.charAt(i) == 'R'){
        count++;
      }else{
        count = 0;
      }
      ans = Math.max(count,ans);
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int count = 0;
    int ans = 0;

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

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

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

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