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

  console.log(rst);
}

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