"use strict";

function main(input) {
  input = input.trim().split("");
  let ans = 0;
  let tmp = 0;
  for (let i = 0; i < input.length; i++) {
    if (input[i] == "R") {
      ans++;
    } else {
      if (tmp <= ans) {
        tmp = ans;
      }
      ans = 0;
    }
  }
  ans = tmp;
  console.log(ans);
}

function numberSort(array) {
  array.sort(f);
  return array;
}

var f = function (a, b) {
  return a - b;
};

main(require("fs").readFileSync("/dev/stdin", "utf-8"));
