s = input()
map = {'SSS': 0, 'SSR': 1, 'SRS': 1, 'RSS': 1, 'SRR': 2, 'RSR': 1, 'RRS': 2, 'RRR': 3}
for key in map.keys():
    if s == key:
        print(map[key])
        break s = input() s input() input map = {'SSS': 0, 'SSR': 1, 'SRS': 1, 'RSS': 1, 'SRR': 2, 'RSR': 1, 'RRS': 2, 'RRR': 3} map {'SSS': 0, 'SSR': 1, 'SRS': 1, 'RSS': 1, 'SRR': 2, 'RSR': 1, 'RRS': 2, 'RRR': 3} 'SSS' 'SSS' 0 'SSR' 'SSR' 1 'SRS' 'SRS' 1 'RSS' 'RSS' 1 'SRR' 'SRR' 2 'RSR' 'RSR' 1 'RRS' 'RRS' 2 'RRR' 'RRR' 3 for key in map.keys():
    if s == key:
        print(map[key])
        break key map.keys() map.keys map keys if s == key:
        print(map[key])
        break s == key s key print(map[key]) print map[key] map key break map = {'SSS': 0, 'SSR': 1, 'SRS': 1, 'RSS': 1, 'SRR': 2, 'RSR': 1, 'RRS': 2, 'RRR': 3} {'SSS': 0, 'SSR': 1, 'SRS': 1, 'RSS': 1, 'SRR': 2, 'RSR': 1, 'RRS': 2, 'RRR': 3} map s = input() input() s
s = input()
map = {'SSS': 0, 'SSR': 1, 'SRS': 1, 'RSS': 1, 'SRR': 2, 'RSR': 1, 'RRS': 2, 'RRR': 3}
for key in map.keys():
    if s == key:
        print(map[key])
        break