s=input()

def ans(s):
  if "RRR" in  s:
    return 3
  elif "RR" in s:
    return 2
  elif "R" in s:
    return 1
  else:
    return 0
print(ans(s)) s=input() s input() input def ans(s):
  if "RRR" in  s:
    return 3
  elif "RR" in s:
    return 2
  elif "R" in s:
    return 1
  else:
    return 0 ans if "RRR" in  s:
    return 3
  elif "RR" in s:
    return 2
  elif "R" in s:
    return 1
  else:
    return 0 "RRR" in  s "RRR" s return 3 3 elif "RR" in s:
    return 2
   "RR" in s "RR" s return 2 2 elif "R" in s:
    return 1
   "R" in s "R" s return 1 1 return 0 0 s s print(ans(s)) print ans(s) ans s s=input() input() s def ans(s):
  if "RRR" in  s:
    return 3
  elif "RR" in s:
    return 2
  elif "R" in s:
    return 1
  else:
    return 0 def ans(s):
  if "RRR" in  s:
    return 3
  elif "RR" in s:
    return 2
  elif "R" in s:
    return 1
  else:
    return 0 ans
s=input()

def ans(s):
  if "RRR" in  s:
    return 3
  elif "RR" in s:
    return 2
  elif "R" in s:
    return 1
  else:
    return 0
print(ans(s))