s = input()

cnt = 0
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 cnt = 0 cnt 0 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 cnt = 0 0 cnt s = input() input() s
s = input()

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