# rainy season

def rainy(S):
  if 'RRR' in S:
    return 3
  if 'RR' in S:
    return 2
  if 'R' in S:
    return 1
  return 0

if __name__ == "__main__":
  input = list(input().split())
  print(rainy(input[0])) def rainy(S):
  if 'RRR' in S:
    return 3
  if 'RR' in S:
    return 2
  if 'R' in S:
    return 1
  return 0 rainy if 'RRR' in S:
    return 3
   'RRR' in S 'RRR' S return 3 3 if 'RR' in S:
    return 2
   'RR' in S 'RR' S return 2 2 if 'R' in S:
    return 1
   'R' in S 'R' S return 1 1 return 0 0 S S if __name__ == "__main__":
  input = list(input().split())
  print(rainy(input[0])) __name__ == "__main__" __name__ "__main__" input = list(input().split()) input list(input().split()) list input().split() ().split () input split print(rainy(input[0])) print rainy(input[0]) rainy input[0] input 0 input = list(input().split()) list(input().split()) input def rainy(S):
  if 'RRR' in S:
    return 3
  if 'RR' in S:
    return 2
  if 'R' in S:
    return 1
  return 0 def rainy(S):
  if 'RRR' in S:
    return 3
  if 'RR' in S:
    return 2
  if 'R' in S:
    return 1
  return 0 rainy
# rainy season

def rainy(S):
  if 'RRR' in S:
    return 3
  if 'RR' in S:
    return 2
  if 'R' in S:
    return 1
  return 0

if __name__ == "__main__":
  input = list(input().split())
  print(rainy(input[0]))
