S = str(input())
count = 0
result = 0
for i in S:
  if i == 'R':
    count+=1
    if count>result:
      result = count
  else:
    count=0
print(result) S = str(input()) S str(input()) str input() input count = 0 count 0 result = 0 result 0 for i in S:
  if i == 'R':
    count+=1
    if count>result:
      result = count
  else:
    count=0 i S if i == 'R':
    count+=1
    if count>result:
      result = count
  else:
    count=0 i == 'R' i 'R' count+=1 count 1 if count>result:
      result = count
   count>result count result result = count result count count=0 count 0 print(result) print result result = count count result count+=1 1 count count = 0 0 count result = 0 0 result count=0 0 count S = str(input()) str(input()) S
S = str(input())
count = 0
result = 0
for i in S:
  if i == 'R':
    count+=1
    if count>result:
      result = count
  else:
    count=0
print(result)
