S = input()
count = 0

if S[0] == 'R' or S[1] == 'R' or S[2] == 'R':
    count = 1

if (S[0] == 'R' and S[1] == 'R') or (S[1] == 'R' and S[2] == 'R'):
    count = 2
if S[0] == 'R' and S[1] == 'R' and S[2] == 'R':
    count = 3

print(count) S = input() S input() input count = 0 count 0 if S[0] == 'R' or S[1] == 'R' or S[2] == 'R':
    count = 1 S[0] == 'R' or S[1] == 'R' or S[2] == 'R' S[0] == 'R' or S[1] == 'R' S[0] == 'R' S[0] S 0 'R' S[1] == 'R' S[1] S 1 'R' S[2] == 'R' S[2] S 2 'R' count = 1 count 1 if (S[0] == 'R' and S[1] == 'R') or (S[1] == 'R' and S[2] == 'R'):
    count = 2 (S[0] == 'R' and S[1] == 'R') or (S[1] == 'R' and S[2] == 'R') S[0] == 'R' and S[1] == 'R' S[0] == 'R' S[0] S 0 'R' S[1] == 'R' S[1] S 1 'R' S[1] == 'R' and S[2] == 'R' S[1] == 'R' S[1] S 1 'R' S[2] == 'R' S[2] S 2 'R' count = 2 count 2 if S[0] == 'R' and S[1] == 'R' and S[2] == 'R':
    count = 3 S[0] == 'R' and S[1] == 'R' and S[2] == 'R' S[0] == 'R' and S[1] == 'R' S[0] == 'R' S[0] S 0 'R' S[1] == 'R' S[1] S 1 'R' S[2] == 'R' S[2] S 2 'R' count = 3 count 3 print(count) print count count = 1 1 count count = 3 3 count S = input() input() S count = 2 2 count count = 0 0 count
S = input()
count = 0

if S[0] == 'R' or S[1] == 'R' or S[2] == 'R':
    count = 1

if (S[0] == 'R' and S[1] == 'R') or (S[1] == 'R' and S[2] == 'R'):
    count = 2
if S[0] == 'R' and S[1] == 'R' and S[2] == 'R':
    count = 3

print(count)