s = input()
cnt = 0

if s == 'RSR':
    cnt = 1
else:
    for i in range(3):
        if s[i] == 'R':
            cnt += 1
    
print(cnt) s = input() s input() input cnt = 0 cnt 0 if s == 'RSR':
    cnt = 1
else:
    for i in range(3):
        if s[i] == 'R':
            cnt += 1
     s == 'RSR' s 'RSR' cnt = 1 cnt 1 for i in range(3):
        if s[i] == 'R':
            cnt += 1
     i range(3) range 3 if s[i] == 'R':
            cnt += 1
     s[i] == 'R' s[i] s i 'R' cnt += 1 cnt 1 print(cnt) print cnt cnt = 0 0 cnt cnt = 1 1 cnt cnt += 1 1 cnt s = input() input() s
s = input()
cnt = 0

if s == 'RSR':
    cnt = 1
else:
    for i in range(3):
        if s[i] == 'R':
            cnt += 1
    
print(cnt)