#abc17a
s=input()
if 'RRR' in s:
 print(3)
elif 'RR' in s:
 print(2)
elif 'R' in s:
 print(1)
else:
 print(0) s=input() s input() input if 'RRR' in s:
 print(3)
elif 'RR' in s:
 print(2)
elif 'R' in s:
 print(1)
else:
 print(0) 'RRR' in s 'RRR' s print(3) print 3 elif 'RR' in s:
 print(2) 'RR' in s 'RR' s print(2) print 2 elif 'R' in s:
 print(1) 'R' in s 'R' s print(1) print 1 print(0) print 0 s=input() input() s
#abc17a
s=input()
if 'RRR' in s:
 print(3)
elif 'RR' in s:
 print(2)
elif 'R' in s:
 print(1)
else:
 print(0)
