# A - Rainy Season

s = input()
for p in ('RRR', 'RR', 'R', ''):
    if p in s:
        print(len(p))
        exit() s = input() s input() input for p in ('RRR', 'RR', 'R', ''):
    if p in s:
        print(len(p))
        exit() p ('RRR', 'RR', 'R', '') 'RRR' 'RR' 'R' '' if p in s:
        print(len(p))
        exit() p in s p s print(len(p)) print len(p) len p exit() exit s = input() input() s
# A - Rainy Season

s = input()
for p in ('RRR', 'RR', 'R', ''):
    if p in s:
        print(len(p))
        exit()
