S = input()
n = S.count('R')

if n == 2:
    if S == 'RSR':
        print(1)
    else:
        print(2)
else:
    print(n) S = input() S input() input n = S.count('R') n S.count('R') S.count S count 'R' if n == 2:
    if S == 'RSR':
        print(1)
    else:
        print(2)
else:
    print(n) n == 2 n 2 if S == 'RSR':
        print(1)
    else:
        print(2) S == 'RSR' S 'RSR' print(1) print 1 print(2) print 2 print(n) print n S = input() input() S n = S.count('R') S.count('R') n
S = input()
n = S.count('R')

if n == 2:
    if S == 'RSR':
        print(1)
    else:
        print(2)
else:
    print(n)