S=input()
result=0
count=0
for i in S:
  if i == "R":
    count+=1
    if count>result:
      result=count
  else:
    count=0
print(result) S=input() S input() input result=0 result 0 count=0 count 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=0 0 result count+=1 1 count count=0 0 count count=0 0 count result=count count result S=input() input() S
S=input()
result=0
count=0
for i in S:
  if i == "R":
    count+=1
    if count>result:
      result=count
  else:
    count=0
print(result)