import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    long startTime = System.currentTimeMillis();
    Scanner stdIn = new Scanner(System.in);
    try {
      String weather = new String();
      weather = stdIn.nextLine();
      char[] weatherList = weather.toCharArray();

      int rainDays = 0;
      for (int dayCnt = 0; dayCnt < 3; dayCnt++) {
        int tempRainDays = 0;
        for (int rainCnt = dayCnt; rainCnt < 3; rainCnt++) {
          if (weatherList[rainCnt] == 'R') {
            tempRainDays++;
          } else {
            break;
          }
        }
        if (rainDays < tempRainDays) {
          rainDays = tempRainDays;
        }
      }
      System.out.println(rainDays);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      stdIn.close();
    }
    long endTime = System.currentTimeMillis();
    double resultTime = (double)(endTime - startTime) / 1000;
    //System.out.println("処理時間：" + resultTime + "ミリ秒");
  }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz