import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int ans = 0;
    int current = 0;
    for(char c : sc.next().toCharArray()) {
      if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      }
    }
    pw.println(ans);
  }
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int ans = 0;
    int current = 0;
    for(char c : sc.next().toCharArray()) {
      if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      }
    }
    pw.println(ans);
  }
} Main public static void main(String[] args) {
    resolve(System.in, System.out);
  } main {
    resolve(System.in, System.out);
  } resolve(System.in, System.out) resolve System.in System System.in System.out System System.out String[] args args static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int ans = 0;
    int current = 0;
    for(char c : sc.next().toCharArray()) {
      if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      }
    }
    pw.println(ans);
  } resolve {
    Scanner sc = new Scanner(is);
    int ans = 0;
    int current = 0;
    for(char c : sc.next().toCharArray()) {
      if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      }
    }
    pw.println(ans);
  } Scanner sc = new Scanner(is); sc new Scanner(is) int ans = 0; ans 0 int current = 0; current 0 for(char c : sc.next().toCharArray()) {
      if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      }
    } char c sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc {
      if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      }
    } {
      if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      }
    } if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      } c == 'R' c 'R' {
        current++;
        ans = Math.max(ans, current);
      } current++ current ans = Math.max(ans, current) ans Math.max(ans, current) Math.max Math ans current {
        current = 0;
      } current = 0 current 0 pw.println(ans) pw.println pw ans InputStream is is PrintStream pw pw public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int ans = 0;
    int current = 0;
    for(char c : sc.next().toCharArray()) {
      if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      }
    }
    pw.println(ans);
  }
} public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int ans = 0;
    int current = 0;
    for(char c : sc.next().toCharArray()) {
      if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      }
    }
    pw.println(ans);
  }
} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    resolve(System.in, System.out);
  }

  static void resolve(InputStream is, PrintStream pw) {
    Scanner sc = new Scanner(is);
    int ans = 0;
    int current = 0;
    for(char c : sc.next().toCharArray()) {
      if (c == 'R') {
        current++;
        ans = Math.max(ans, current);
      } else {
        current = 0;
      }
    }
    pw.println(ans);
  }
}
