s = input()
count =0
fcount = 0
for i in s:
  if i=='R' and count>0:
    count = count + 1
    fcount = max(fcount,count)
  elif i=='R':
    count = 1
    fcount = 1
  else:
  	count = 0
print(fcount) s = input() s input() input count =0 count 0 fcount = 0 fcount 0 for i in s:
  if i=='R' and count>0:
    count = count + 1
    fcount = max(fcount,count)
  elif i=='R':
    count = 1
    fcount = 1
  else:
  	count = 0 i s if i=='R' and count>0:
    count = count + 1
    fcount = max(fcount,count)
  elif i=='R':
    count = 1
    fcount = 1
  else:
  	count = 0 i=='R' and count>0 i=='R' i 'R' count>0 count 0 count = count + 1 count count + 1 count 1 fcount = max(fcount,count) fcount max(fcount,count) max fcount count elif i=='R':
    count = 1
    fcount = 1
   i=='R' i 'R' count = 1 count 1 fcount = 1 fcount 1 count = 0 count 0 print(fcount) print fcount count = count + 1 count + 1 count count = 1 1 count fcount = 1 1 fcount count =0 0 count s = input() input() s fcount = 0 0 fcount count = 0 0 count fcount = max(fcount,count) max(fcount,count) fcount
s = input()
count =0
fcount = 0
for i in s:
  if i=='R' and count>0:
    count = count + 1
    fcount = max(fcount,count)
  elif i=='R':
    count = 1
    fcount = 1
  else:
  	count = 0
print(fcount)
