s = input()
t = s.count('R')
if t == 2:
    if s[1] == 'R':
        print(2)
    else:
        print(1)
else:
    print(t) s = input() s input() input t = s.count('R') t s.count('R') s.count s count 'R' if t == 2:
    if s[1] == 'R':
        print(2)
    else:
        print(1)
else:
    print(t) t == 2 t 2 if s[1] == 'R':
        print(2)
    else:
        print(1) s[1] == 'R' s[1] s 1 'R' print(2) print 2 print(1) print 1 print(t) print t s = input() input() s t = s.count('R') s.count('R') t
s = input()
t = s.count('R')
if t == 2:
    if s[1] == 'R':
        print(2)
    else:
        print(1)
else:
    print(t)