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

  console.log(rst);
}

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