W = input()
ans = 0
count = 0
for i in range(len(W)):
  if W[i] == "R":
    count += 1
    ans = max(ans,count)
  else:
    count = 0
print(ans) W = input() W input() input ans = 0 ans 0 count = 0 count 0 for i in range(len(W)):
  if W[i] == "R":
    count += 1
    ans = max(ans,count)
  else:
    count = 0 i range(len(W)) range len(W) len W if W[i] == "R":
    count += 1
    ans = max(ans,count)
  else:
    count = 0 W[i] == "R" W[i] W i "R" count += 1 count 1 ans = max(ans,count) ans max(ans,count) max ans count count = 0 count 0 print(ans) print ans count = 0 0 count count += 1 1 count ans = 0 0 ans W = input() input() W ans = max(ans,count) max(ans,count) ans count = 0 0 count
W = input()
ans = 0
count = 0
for i in range(len(W)):
  if W[i] == "R":
    count += 1
    ans = max(ans,count)
  else:
    count = 0
print(ans)