S=input()
count=[0]
s=0
for i in range(3):
    if S[i]=='R':
        if i==2 or S[i+1]=='S':
            s=s+1
            count.append(s)
            s=0
        else:
            s=s+1
print(max(count)) S=input() S input() input count=[0] count [0] 0 s=0 s 0 for i in range(3):
    if S[i]=='R':
        if i==2 or S[i+1]=='S':
            s=s+1
            count.append(s)
            s=0
        else:
            s=s+1 i range(3) range 3 if S[i]=='R':
        if i==2 or S[i+1]=='S':
            s=s+1
            count.append(s)
            s=0
        else:
            s=s+1 S[i]=='R' S[i] S i 'R' if i==2 or S[i+1]=='S':
            s=s+1
            count.append(s)
            s=0
        else:
            s=s+1 i==2 or S[i+1]=='S' i==2 i 2 S[i+1]=='S' S[i+1] S i+1 i 1 'S' s=s+1 s s+1 s 1 count.append(s) count.append count append s s=0 s 0 s=s+1 s s+1 s 1 print(max(count)) print max(count) max count s=s+1 s+1 s s=s+1 s+1 s s=0 0 s S=input() input() S s=0 0 s count=[0] [0] count
S=input()
count=[0]
s=0
for i in range(3):
    if S[i]=='R':
        if i==2 or S[i+1]=='S':
            s=s+1
            count.append(s)
            s=0
        else:
            s=s+1
print(max(count))