W = list(input())

ans = []
a = 0
for i in W:
  if i == 'R':
    a += 1
  else:
    ans.append(a)
    a = 0

ans.append(a)
print(max(ans)) W = list(input()) W list(input()) list input() input ans = [] ans [] a = 0 a 0 for i in W:
  if i == 'R':
    a += 1
  else:
    ans.append(a)
    a = 0 i W if i == 'R':
    a += 1
  else:
    ans.append(a)
    a = 0 i == 'R' i 'R' a += 1 a 1 ans.append(a) ans.append ans append a a = 0 a 0 ans.append(a) ans.append ans append a print(max(ans)) print max(ans) max ans a = 0 0 a ans = [] [] ans a += 1 1 a a = 0 0 a W = list(input()) list(input()) W
W = list(input())

ans = []
a = 0
for i in W:
  if i == 'R':
    a += 1
  else:
    ans.append(a)
    a = 0

ans.append(a)
print(max(ans))
