S = input()
# 'S': 晴 'R': 雨 #長さ3
count = 0
maximum = 0
for s in S:
  if s == 'R':
    count += 1
  else:
    count = 0
  maximum = max(maximum, count)
print(maximum) S = input() S input() input count = 0 count 0 maximum = 0 maximum 0 for s in S:
  if s == 'R':
    count += 1
  else:
    count = 0
  maximum = max(maximum, count) s S if s == 'R':
    count += 1
  else:
    count = 0
   s == 'R' s 'R' count += 1 count 1 count = 0 count 0 maximum = max(maximum, count) maximum max(maximum, count) max maximum count print(maximum) print maximum count = 0 0 count count = 0 0 count maximum = 0 0 maximum S = input() input() S count += 1 1 count maximum = max(maximum, count) max(maximum, count) maximum
S = input()
# 'S': 晴 'R': 雨 #長さ3
count = 0
maximum = 0
for s in S:
  if s == 'R':
    count += 1
  else:
    count = 0
  maximum = max(maximum, count)
print(maximum)