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 + "ミリ秒");
  }
} import java.util.Scanner; Scanner java.util 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 + "ミリ秒");
  }
} 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 + "ミリ秒");
  } main {
    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 + "ミリ秒");
  } long startTime = System.currentTimeMillis(); startTime System.currentTimeMillis() System.currentTimeMillis System Scanner stdIn = new Scanner(System.in); 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();
    } catch (Exception e) {
      e.printStackTrace();
    } Exception e {
      e.printStackTrace();
    } e.printStackTrace() e.printStackTrace e {
      stdIn.close();
    } stdIn.close() stdIn.close stdIn {
      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);
    } String weather = new String(); weather new String() weather = stdIn.nextLine() weather stdIn.nextLine() stdIn.nextLine stdIn char[] weatherList = weather.toCharArray(); weatherList weather.toCharArray() weather.toCharArray weather int rainDays = 0; 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;
        }
      } int dayCnt = 0; int dayCnt = 0; dayCnt 0 dayCnt < 3 dayCnt 3 dayCnt++ dayCnt++ dayCnt {
        int tempRainDays = 0;
        for (int rainCnt = dayCnt; rainCnt < 3; rainCnt++) {
          if (weatherList[rainCnt] == 'R') {
            tempRainDays++;
          } else {
            break;
          }
        }
        if (rainDays < tempRainDays) {
          rainDays = tempRainDays;
        }
      } {
        int tempRainDays = 0;
        for (int rainCnt = dayCnt; rainCnt < 3; rainCnt++) {
          if (weatherList[rainCnt] == 'R') {
            tempRainDays++;
          } else {
            break;
          }
        }
        if (rainDays < tempRainDays) {
          rainDays = tempRainDays;
        }
      } int tempRainDays = 0; tempRainDays 0 for (int rainCnt = dayCnt; rainCnt < 3; rainCnt++) {
          if (weatherList[rainCnt] == 'R') {
            tempRainDays++;
          } else {
            break;
          }
        } int rainCnt = dayCnt; int rainCnt = dayCnt; rainCnt dayCnt rainCnt < 3 rainCnt 3 rainCnt++ rainCnt++ rainCnt {
          if (weatherList[rainCnt] == 'R') {
            tempRainDays++;
          } else {
            break;
          }
        } {
          if (weatherList[rainCnt] == 'R') {
            tempRainDays++;
          } else {
            break;
          }
        } if (weatherList[rainCnt] == 'R') {
            tempRainDays++;
          } else {
            break;
          } weatherList[rainCnt] == 'R' weatherList[rainCnt] weatherList rainCnt 'R' {
            tempRainDays++;
          } tempRainDays++ tempRainDays {
            break;
          } break; if (rainDays < tempRainDays) {
          rainDays = tempRainDays;
        } rainDays < tempRainDays rainDays tempRainDays {
          rainDays = tempRainDays;
        } rainDays = tempRainDays rainDays tempRainDays System.out.println(rainDays) System.out.println System.out System System.out rainDays long endTime = System.currentTimeMillis(); endTime System.currentTimeMillis() System.currentTimeMillis System double resultTime = (double)(endTime - startTime) / 1000; resultTime (double)(endTime - startTime) / 1000 (double)(endTime - startTime) endTime startTime 1000 String[] args args 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 + "ミリ秒");
  }
} 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 + "ミリ秒");
  }
} Main
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 + "ミリ秒");
  }
}