s = input()
c = s.count('R')
if c == 2 and s[1] == 'S':
    c = 1
print(c) s = input() s input() input c = s.count('R') c s.count('R') s.count s count 'R' if c == 2 and s[1] == 'S':
    c = 1 c == 2 and s[1] == 'S' c == 2 c 2 s[1] == 'S' s[1] s 1 'S' c = 1 c 1 print(c) print c c = s.count('R') s.count('R') c c = 1 1 c s = input() input() s
s = input()
c = s.count('R')
if c == 2 and s[1] == 'S':
    c = 1
print(c)