S=input()
ans=0
if 'R' in S:
    ans+=1
    if S[0]=='R' and S[1]=='R':
        ans+=1
    if S[1]=='R' and S[2]=='R':
        ans+=1
print(ans) S=input() S input() input ans=0 ans 0 if 'R' in S:
    ans+=1
    if S[0]=='R' and S[1]=='R':
        ans+=1
    if S[1]=='R' and S[2]=='R':
        ans+=1 'R' in S 'R' S ans+=1 ans 1 if S[0]=='R' and S[1]=='R':
        ans+=1
     S[0]=='R' and S[1]=='R' S[0]=='R' S[0] S 0 'R' S[1]=='R' S[1] S 1 'R' ans+=1 ans 1 if S[1]=='R' and S[2]=='R':
        ans+=1 S[1]=='R' and S[2]=='R' S[1]=='R' S[1] S 1 'R' S[2]=='R' S[2] S 2 'R' ans+=1 ans 1 print(ans) print ans ans+=1 1 ans ans+=1 1 ans ans+=1 1 ans S=input() input() S ans=0 0 ans
S=input()
ans=0
if 'R' in S:
    ans+=1
    if S[0]=='R' and S[1]=='R':
        ans+=1
    if S[1]=='R' and S[2]=='R':
        ans+=1
print(ans)
