import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    // 入力値を取得する
    String input = sc.nextLine();
    String result = "0";

    int result1 = input.indexOf("RRR");
    if (result1 > -1) {
      result = "3";
    } else {
	    int result2 = input.indexOf("RR");
        if (result2 > -1) {
          result = "2";
        } else {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        }
    }
    System.out.println(result);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    // 入力値を取得する
    String input = sc.nextLine();
    String result = "0";

    int result1 = input.indexOf("RRR");
    if (result1 > -1) {
      result = "3";
    } else {
	    int result2 = input.indexOf("RR");
        if (result2 > -1) {
          result = "2";
        } else {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        }
    }
    System.out.println(result);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    // 入力値を取得する
    String input = sc.nextLine();
    String result = "0";

    int result1 = input.indexOf("RRR");
    if (result1 > -1) {
      result = "3";
    } else {
	    int result2 = input.indexOf("RR");
        if (result2 > -1) {
          result = "2";
        } else {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        }
    }
    System.out.println(result);
  } main {
    Scanner sc = new Scanner(System.in);
    
    // 入力値を取得する
    String input = sc.nextLine();
    String result = "0";

    int result1 = input.indexOf("RRR");
    if (result1 > -1) {
      result = "3";
    } else {
	    int result2 = input.indexOf("RR");
        if (result2 > -1) {
          result = "2";
        } else {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        }
    }
    System.out.println(result);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc String result = "0"; result "0" int result1 = input.indexOf("RRR"); result1 input.indexOf("RRR") input.indexOf input "RRR" if (result1 > -1) {
      result = "3";
    } else {
	    int result2 = input.indexOf("RR");
        if (result2 > -1) {
          result = "2";
        } else {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        }
    } result1 > -1 result1 -1 1 {
      result = "3";
    } result = "3" result "3" {
	    int result2 = input.indexOf("RR");
        if (result2 > -1) {
          result = "2";
        } else {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        }
    } int result2 = input.indexOf("RR"); result2 input.indexOf("RR") input.indexOf input "RR" if (result2 > -1) {
          result = "2";
        } else {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        } result2 > -1 result2 -1 1 {
          result = "2";
        } result = "2" result "2" {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        } int result3 = input.indexOf("R"); result3 input.indexOf("R") input.indexOf input "R" if (result3 > -1) {
            result = "1";
          } result3 > -1 result3 -1 1 {
            result = "1";
          } result = "1" result "1" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    // 入力値を取得する
    String input = sc.nextLine();
    String result = "0";

    int result1 = input.indexOf("RRR");
    if (result1 > -1) {
      result = "3";
    } else {
	    int result2 = input.indexOf("RR");
        if (result2 > -1) {
          result = "2";
        } else {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        }
    }
    System.out.println(result);
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    // 入力値を取得する
    String input = sc.nextLine();
    String result = "0";

    int result1 = input.indexOf("RRR");
    if (result1 > -1) {
      result = "3";
    } else {
	    int result2 = input.indexOf("RR");
        if (result2 > -1) {
          result = "2";
        } else {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        }
    }
    System.out.println(result);
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    // 入力値を取得する
    String input = sc.nextLine();
    String result = "0";

    int result1 = input.indexOf("RRR");
    if (result1 > -1) {
      result = "3";
    } else {
	    int result2 = input.indexOf("RR");
        if (result2 > -1) {
          result = "2";
        } else {
          int result3 = input.indexOf("R");
          if (result3 > -1) {
            result = "1";
          }
        }
    }
    System.out.println(result);
  }
}
