s = input()
cnt = 0
for x in range(2):
    if s[x] == 'R' and s[x+1] == 'R':
        cnt += 1

for x in s:
    if x == 'R':
        cnt += 1
        break

print(cnt) s = input() s input() input cnt = 0 cnt 0 for x in range(2):
    if s[x] == 'R' and s[x+1] == 'R':
        cnt += 1 x range(2) range 2 if s[x] == 'R' and s[x+1] == 'R':
        cnt += 1 s[x] == 'R' and s[x+1] == 'R' s[x] == 'R' s[x] s x 'R' s[x+1] == 'R' s[x+1] s x+1 x 1 'R' cnt += 1 cnt 1 for x in s:
    if x == 'R':
        cnt += 1
        break x s if x == 'R':
        cnt += 1
        break x == 'R' x 'R' cnt += 1 cnt 1 break print(cnt) print cnt cnt += 1 1 cnt cnt += 1 1 cnt s = input() input() s cnt = 0 0 cnt
s = input()
cnt = 0
for x in range(2):
    if s[x] == 'R' and s[x+1] == 'R':
        cnt += 1

for x in s:
    if x == 'R':
        cnt += 1
        break

print(cnt)