function Main(input) {
  const weathers = input.trim();
  //
  //R
  //RR
  //RRR
  let rst = 0;
  if (
    input === "RSS" ||
    input === "SRS" ||
    input === "SSR" ||
    input === "RSR"
  ) {
    rst = 1;
  }

  if (input === "RRS" || input === "SRR") rst = 2;
  if (input === "RRR") rst = 3;

  console.log(rst);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
