Problem:
 Score : 100 points    Problem Statement We have weather records at AtCoder Town for some consecutive three days. A string of length 3 , S , represents the records - if the i -th character is S , it means it was sunny on the i -th day; if that character is R , it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.      Constraints  |S| = 3  Each character of S is S or R .         Input Input is given from Standard Input in the following format:  S       Output Print the maximum number of consecutive rainy days in the period.        Sample Input 1 RRS      Sample Output 1 2  We had rain on the 1 -st and 2 -nd days in the period. Here, the maximum number of consecutive rainy days is 2 , so we should print 2 .       Sample Input 2 SSS      Sample Output 2 0  It was sunny throughout the period. We had no rainy days, so we should print 0 .       Sample Input 3 RSR      Sample Output 3 1  We had rain on the 1 -st and 3 -rd days - two "streaks" of one rainy day, so we should print 1 .

Solution (Python):
s = list(input())
count = 0
result = 0

for v in s:
    if v == 'S':
        count = 0
        continue
    else:
        count += 1
        result = count

print(result)

Solution (Python):
s = input()
ans = 0

for i in range(1, 4):
    p = "R" *i
    if p in s:
        ans = i
print(ans)

Solution (Python):
s = input()

count = 0
ans = 0

for i in s:
    if i == 'R':
        count += 1
    if i == 'S':
        if count >= ans:
            ans = count
        count = 0
if count >= ans:
  ans = count
print(ans)

Solution (Python):
S = input()
ans = 0
ss = S.split('S')
for d in ss:
    if len(d) > ans:
        ans = len(d)
print(ans)

Solution (Python):
S = input()

if 'RRR' in S:
    print(3)
    exit(0)
elif 'RR' in S:
    print(2)
    exit(0)
elif 'R' in S:
    print(1)
    exit(0)
else:
    print(0)

Solution (Python):
s = input().split('S')

ans = 0

for i in s:
  if len(i) > ans:
    ans = len(i)
    
print(ans)

Solution (Python):
s=input().split("S")
print(max(map(len, s)))

Solution (Python):
s=input().split("S")
print(max(map(len, s)))

Solution (Python):
s = input()
if s == 'RRR':
    print(3)
elif s == 'RRS' or s == 'SRR':
    print(2)
elif s == 'SSS':
    print(0)
else:
    print(1)

Solution (Python):
s = input()

a = 0
ma = 0
for ss in s:
    if ss == 'R':
        a += 1
    else:
        a = 0
    ma = max(ma, a)

print(ma)

Solution (Python):
s = input()
if "RRR" in s:
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
s=input()
if 'RRR' in s:
  print(3)
elif 'RR' in s:
  print(2)
elif 'R' in s:
  print(1)
else:
  print(0)

Solution (Python):
S = input()

if S == "RRR":
    print(3)
elif S == "RRS" or S == "SRR":
    print(2)
elif S == "SSS":
    print(0)
else:
    print(1)

Solution (Python):
s = input()
r = 3 if s == 'RRR' else 1
if 'RR' in s and s != 'RRR':
    r = 2
elif not 'R' in s:
    r = 0
print(r)

Solution (Python):
S = input()

ans = 0

for i in range(3):
  if S[i] == "R":
    ans += 1
  else:
    pass

if S[1] == "S" and ans == 2:
  ans -= 1

print(ans)

Solution (Python):
s = input()
 
def A():
  if s == 'RRR':
    return 3
  if s == 'RRS' or s == 'SRR':
    return 2
  if s == 'SSS':
    return 0
  return 1
 
print(A())

Solution (Python):
s=input()
if "RRR"==s:
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
S = input()

R_n = 0
R_max = 0
for i in S:
  if i == 'R':
    R_n += 1
  else:
    if R_n != 0:
      R_max = R_n
    R_n = 0
    
if R_n > R_max:
  R_max = R_n

print(R_max)

Solution (Python):
s = input()
if s == "RRR":
    print(3)
elif s == "RRS" or s == "SRR":
    print(2)
elif s == "SSS":
    print(0)
else:
    print(1)

Solution (Python):
s = input()
if s == "RRR":
    ans = 3
elif "RR" in s:
    ans = 2
elif "R" in s:
    ans = 1
else:
    ans = 0
print(ans)

Solution (Python):
s = input()

if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
if s == "RRR":
  print("3")
elif s == "RRS" or s == "SRR":
  print("2")
elif s == "SSS":
  print("0")
else:
  print("1")

Solution (Python):
S = input()
if S == 'RRR':
    print(3)

elif S == 'RRS' or S == 'SRR':
    print(2)

elif 'R' in S:
    print(1)

else:
    print(0)

Solution (Python):
s = input()
r = s.count('R')
if r == 0:
    print(0)
elif r == 1:
    print(1)
elif r == 3:
    print(3)
else:
    if s[1] == 'R':
        print(2)
    else:
        print(1)

Solution (Python):
S = input()

if S == "RRR":
    print(3)
elif S == "SSS":
    print(0)
elif S[0:2] == "RR" or S[1:3] == "RR":
    print(2)
else:
    print(1)

Solution (Python):
S = input()
prev = True
ans = 0
cnt = 0
for i in range(3):
  if S[i] == 'R':
    if prev:
      cnt += 1
    else:
      prev = True
      cnt = 1
  else:
    ans = max(ans, cnt)
    cnt = 0
    prev = False
print(max(ans, cnt))

Solution (Python):
S = input()
if S == "RRR":
  print("3")
elif S == "RRS" or S == "SRR":
  print("2")
elif S == "SSS":
  print("0")
else:
  print("1")

Solution (Python):
s = input()

if "RRR" in s:
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
s=input();ans=0
if s=="RRR":
  print(3)
elif "RR" in s:
  print(2)
elif "R" in s:
  print(1)
else:
  print(0)

Solution (Python):
from __future__ import division, print_function






from sys import stdin, stdout
import bisect            
import math
import heapq
i_m=9223372036854775807
def inin():
    return int(input())
def stin():
    return input()
def spin():
    return map(int,stin().split())
def lin():                           
    return list(map(int,stin().split()))
def matrix(n):
    
    return [list(map(int,input().split()))for i in range(n)]


def calculate_sum(a, N): 
    
    m = N / a 
    
    sum = m * (m + 1) / 2
    
    ans = a * sum
    return ans
def series(N):
    return (N*(N+1))//2

def count2Dmatrix(i,list):
    return sum(c.count(i) for c in list)

def modinv(n,p):
    return pow(n,p-2,p)

def GCD(x, y): 
    x=abs(x)
    y=abs(y)
    if(min(x,y)==0):
        return max(x,y)
    while(y): 
        x, y = y, x % y 
    return x
def LCM (x, y):
    return (x * y) // GCD(x, y)
    
def Divisors(n) : 
    l = []  
    for i in range(1, int(math.sqrt(n) + 1)) :
        if (n % i == 0) : 
            if (n // i == i) : 
                l.append(i) 
            else : 
                l.append(i)
                l.append(n//i)
    return l
def isprime(n):
    for i in range(2, int(math.sqrt(n))+1):
        if n%i==0:
            return False
    return True
prime=[]
def SieveOfEratosthenes(n): 
    global prime
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p): 
                prime[i] = False
        p += 1
    f=[]
    for p in range(2, n): 
        if prime[p]: 
            f.append(p)
    return f
q=[]       
def dfs(n,d,v,c):
    global q
    v[n]=1
    x=d[n]
    q.append(n)
    j=c
    for i in x:
        if i not in v:
            f=dfs(i,d,v,c+1)
            j=max(j,f)
            
    return j

 
"""*******************************************************"""
s = list(stin())

c = 0; temp = 0
for i in s:
    if i=='R':
        c+=1
    else:
        if c>0:
            temp = c
        c = 0
print(max(temp, c))

Solution (Python):
s = input()

maxR = 0
count = 0

for x in range(len(s)):
  if s[x] == "S":
    maxR = max(maxR, count)
    count = 0
  else:
    count += 1

print(max(count, maxR))

Solution (Python):
print(max(map(len,(''.join(map(lambda x : '1' if x=='S' else '0', input()))).split('1'))))

Solution (Python):
s = input()
if s == "RRR":
    print(3)
elif s == "SRR" or s == "RRS":
    print(2)
elif s == "SSS":
    print(0)
else:
    print(1)

Solution (Python):
s = input()
if s == "RRR":
  print(3)
elif "RR" in s:
  print(2)
elif s == "SSS":
  print(0)
else:
  print(1)

Solution (Python):
ws = list(input())
c=max=0
bef=''
for w in ws:
    if 'R' == w:
        if 'R' == bef: c+=1
        else: c=1
        if max <= c: max =c
    bef=w
print(max)

Solution (Python):
s = input()

if s == "RRR":
  print(3)
elif s == "SRR" or s == "RRS":
  print(2)
elif s == "SSS":
  print(0)
else:
  print(1)

Solution (Python):
s=input().split('S')
if s.count('RRR'): print(3)
elif s.count('RR'): print(2)
elif s.count('R'): print(1)
else: print(0)

Solution (Python):
def main():

    s = input()
    
    ans = 0

    if s == "RRR":
        ans = 3
    elif "RR" in s:
        ans = 2
    elif "R" in s:
        ans = 1
    else:
        ans = 0

    print(ans)
    
    return 0

if __name__ == "__main__":
    main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()

print(max(map(len, S.split("S"))))

Solution (Python):
s = input()
 
if s == 'RRR':
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
from math import *
from copy import *
from string import *				
from random import *
from sys import stdin,stdout
from sys import maxsize
from operator import *				
from itertools import *
from collections import Counter		
import math
import math
import time
from queue import Queue


def seive(n):
	l=[True]
	l=l*(n+1)
	for i in range(2,int(sqrt(n))+1):
		if(l[i]==True):
			val=i*i
			while(val<len(l)):
				l[val]=False
				val+=i
	prime=[]
	for i in range(2,len(l)):
		if(l[i]==True):
			prime.append(i)
	return prime

def dp(l,i,n,val,ans):
	if(i>=n or val<0):
		return 1000000
	elif(val==0):
		return 0
	else:
		if(ans[i]==1000000):
			ans[i]=min(min(1+dp(l,i+1,n,val-l[i],ans),1+dp(l,i,n,val-l[i],ans)),dp(l,i+1,n,val,ans))
		return ans[i]
from queue import Queue
def factors(n):
	l=[]
	for i in range(1,int(sqrt(n))+1):
		if(n%i==0):
			if(n//i==i):
				l.append(i)
			else:
				l.append(i)
				l.append(n//i)
	return l
def check1(s,v,x):
	while(True):
		if(v not in s):
			return v
		else:
			v-=1
def check2(s,v,x):
	while(True):
		if(v not in s):
			return v
		else:
			v+=1

def up(n):
	j=n-1
	while(j>0):
		if(n%j==0):
			break
		j-=1
	return j		
def fac(n):
	c=1
	i=1
	while(i<=n):
		c*=i
		i+=1
	return c
def check_happy(n):
	ss=set()
	print(n)
	while(n!=1):
		val=n
		s=0
		print(val)
		while(val!=0):
			s+=(val%10)**2
			val=val//10
		print(val)
		print("hi")
		if(val in ss):
			return False
		else:
			n=val
			ss.add(n)
	return True
def update(a,b):
	c=1
	val=a
	while(a<b):
		print(c,a)
		c+=c
		a+=a
	print(1)
	while(a>b):
		print()
		a-=val
		c-=1
	return c
import random as rand
def gcd(a,b): 
    if a == 0: 
        return b 
    return gcd(b % a, a) 

from itertools import permutations
def insertion_sort(arr):
	for i in range(len(arr)):
		j=i
		while(j>0):
			if(arr[j]<arr[j-1]):
				temp=arr[j]
				arr[j]=arr[j-1]
				arr[j-1]=temp
			j-=1
	return arr
def quick_sort(arr,low,high):
	i=low
	j=high
	
	while(i<j):
		if(arr[i]>arr[low] and arr[j]<arr[low]):
			temp=arr[i]
			arr[i]=arr[j]
			arr[j]=arr[i]
			i+=1
			j-=1
		elif(arr[i]<=arr[low]):
			i+=1
		elif(arr[j]>=arr[low]):
			j-=1
	print(i,j)
	toto=arr[j]
	arr[j]=arr[low]
	arr[low]=toto
	return j
def dodo(arr,low,high):
	if(low<high):
		val=quick_sort(arr,low,high)
		dodo(arr,low,val-1)
		dodo(arr,val+1,high)
def dp(arr,c,n,k,z,ans):
	if(k==0):
		return ans
	else:
		if(c==0):
			return dp(arr,c+1,n,k-1,z,ans+arr[c+1])
		elif(c==n-1):
			if(z==0):
				return 0
			else:
				return dp(arr,c-1,n,k-1,z-1,ans+arr[c-1])
		else:
			if(z==0):
				return dp(arr,c+1,n,k-1,z,ans+arr[c+1])
			else:
				return max(dp(arr,c+1,n,k-1,z,ans+arr[c+1]),dp(arr,c-1,n,k-1,z-1,ans+arr[c-1]))
def check(arr,val):
	a=-1
	for i in range(len(arr)):
		if(arr[i][len(arr[i])-1]==val):
			a=i
			break
	return a

def reverse(s,i,ans):
	if(i>=len(s)):
		return ans
	else:
		return reverse(s,i+1,s[i]+ans)
def update(arr,i,j,n,m):
    if(i>=0 and i<n and j>=0 and j<m):
        if(arr[i][j]==1):
            arr[i][j]==2
            return [i,j]
    return [-1,-1]
if __name__ == '__main__':
	s=input()
	maxa=0
	val=0
	for i in s:
		if(i=="R"):
			val+=1
		else:
			maxa=max(maxa,val)
			val=0
	print(max(maxa,val))

Solution (Python):
s = list(input())

count = 0
high = 0
for each in s:
    if each == 'R':
        count += 1
    else:
        count = 0
    if count > high:
        high = count
print(high)

Solution (Python):
s=input()

if "RRR" in s:
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
rain = 0
ans = 0
for i in s:
  if i == "R":
    rain += 1
    ans = max(ans, rain)
  else:
    rain = 0
print(ans)

Solution (Python):
x=input()
o=0
c=0
for i in range(len(x)):
  if x[i]=='S':
    o=max(o,c)
    c=0
  else:
    c+=1
o=max(c,o)

print(o)

Solution (Python):
s = input()

if s.count("R") == 0:
    print(0)
elif s.count("R") == 1:
    print(1)
elif s.count("R") == 3:
    print(3)
else:
    if s == "RRS" or s == "SRR":
        print(2)
    else:
        print(1)

Solution (Python):
s=input()
if s.count("R") == 2:
  if s[1] == "R":
    print(2)
  else:
    print(1)
else:
  print(s.count("R"))

Solution (Python):
s = input()
if s == 'RRR':
  print(3)
  exit()
if 'RR' in s:
  print(2)
  exit()
if 'R' in s:
  print(1)
  exit()
print(0)

Solution (Python):
s = input()
if s == 'RRR':
    print (3)
elif s.count('RR') == 1:
    print (2)
elif s.count('R') == 1 or s.count('R') == 2:
    print (1)
else:
    print (0)

Solution (Python):
s=input()
a=0
if "RRR" in s:
  a=3
elif "RR" in s:
  a= 2
elif "R" in s:
  a=1

  
print(a)

Solution (Python):
s=input()
if s == 'RRR':
  print(3)
elif s == 'SRR' or s == 'RRS':
  print(2)
elif s == 'SSS':
  print(0)
else:
  print(1)

Solution (Python):
s=input()
if s.find("RRR")>-1:
  print(3)
elif s.find("RR")>-1:
  print(2)
elif s.find("R")>-1:
  print(1)
else:
  print(0)

Solution (Python):
S = input()

if S.count('RRR'):
  print(3)
elif S.count('RR'):  
  print(2)
elif S.count('R'):
  print(1)
else:
  print(0)

Solution (Python):
S = input()

ans = 0
r = 0
for s in S:
    if s == "R":
        r += 1
    else:
        r = 0
    ans = max(ans, r)
print(ans)

Solution (Python):
A = input()
count = 0
for a in range(3):
    if A[a] == 'R':
      count+=1
      
if count == 2 and A[1] == 'S':
      count = 1
print(count)

Solution (Python):


def main():
    s = str(input())

    if s == "RRR":
        print(3)
    elif s == "RRS" or s == "SRR":
        print(2)
    elif s == "SSS":
        print(0)
    else:
        print(1)

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
 
ans = 1
if S == 'RRR':
    ans = 3
elif S == 'SSS':
    ans = 0
elif S == 'RRS' or S == 'SRR':
    ans = 2
print(ans)

Solution (Python):
s = input()
if "RRR" in s:
  print(3)
elif "RR" in s:
  print(2)
elif "R" in s:
  print(1)
else:
  print(0)

Solution (Python):
S = input()
 
ans = 1
if S == 'RRR':
    ans = 3
elif S == 'SSS':
    ans = 0
elif S == 'RRS' or S == 'SRR':
    ans = 2
print(ans)

Solution (Python):
S = input()

ans = 1
if S == 'RRR':
    ans = 3
elif S == 'SSS':
    ans = 0
elif S == 'RRS' or S == 'SRR':
    ans = 2
print(ans)

Solution (Python):

s=input()





if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
max = 0
tmp = 0
for i in range(3):
    if s[i] == "R":
        tmp += 1
        if tmp >= max:
            max = tmp
    else:
        tmp = 0

print(max)

Solution (Python):
S = input()
if(S == 'SSS'):
  print(0)
elif(S == 'RSS' or S == 'SRS' or S == 'SSR' or S == 'RSR'):
  print(1)
elif(S == 'RRS' or S == 'SRR'):
  print(2)
else:
  print(3)

Solution (Python):
s=input()
gou=0
if s[0]=="R" or s[1]=="R" or s[2]=="R":
  gou=1
if s[0]=="R" and s[1]=="R":
  gou=2
if s[1]=="R" and s[2]=="R":
  gou=2
if s[1]=="R" and s[2]=="R" and s[0]=="R":
  gou=3
print(gou)

Solution (Python):
n = str(input())
d1 = n[0]
d2 = n[1]
d3 = n[2]

if d1 == 'R':
    if d2 == 'R':
        if d3 == 'R':
            print(3)
        else:
            print(2)    
    else:
        print(1)
elif d2 == 'R':
    if d3 == 'R':
        print(2)
    else:
        print(1)
elif d3 =='R':
    print(1)
else:
    print(0)

Solution (Python):


S = input()
if S == 'RRR':
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Solution (Python):
S=input()
if "RRR" in S:
    print(3)
elif "RR" in S:
    print(2)
elif "R" in S:
    print(1)
else:
    print(0)

Solution (Python):
s = list(input())
t = s.count('R')

if t == 2:
    if s[1] == 'R':
        ans = t
    else:
        ans = 1
else:
    ans = t
print(ans)

Solution (Python):
S = input()

if S == "RRR":
  print(3)
elif S in ["RRS","SRR"]:
  print(2)
elif S == "SSS":
  print(0)
else:
  print(1)

Solution (Python):
s = input()

if s =="SSS":
    print(0)
elif s =="RSS" or s =="SRS" or s == "SSR" or s == "RSR":
    print(1)
elif s =="RRR":
    print(3)
else:
    print(2)

Solution (Python):
S = open(0).read().split()[0]
if 'RRR' in S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Solution (Python):
S=input()

if S=="RSR":
  print(1)
else:
  print(S.count("R"))

Solution (Python):
S = input()
if S == 'RRR':
  print(3)
elif 'RR' in S:
  print(2)
elif 'R' in S:
  print(1)
else:
  print(0)

Solution (Python):



s = input()

if s == 'RRR':
    print(3)
elif s == 'RRS' or s == 'SRR':
    print(2)
elif s == 'SSS':
    print(0)
else:
    print(1)

Solution (Python):
a=list(input())
p=(a[0]=="R")
q=(a[1]=="R")
r=(a[2]=="R")

if (p and q and r):
  print(3)
elif (p and q) or (q and r):
  print(2)
elif (p or q or r):
  print(1)
else:
  print(0)

Solution (Python):
s = input()

if s == 'RRR':
    print(3)
elif s in ['SRR', 'RRS']:
    print(2)
elif s == 'SSS':
    print(0)
else:
    print(1)

Solution (Python):
s = input()
def s_count(s):
    m = list(s)
    array = [0. for i in range(len(m))]
    count = 0
    for i in range(len(m)):
        if m[i] == 'R':
            array[i] += 1
            if (i > 0 and m[i] == m[i-1]):
                count += 1
                array[i] += count
            else:
                count = 0
    return max(array)
print(int(s_count(s)))

Solution (Python):
max_count = 0
count = 0

for s in input():
    if s == 'R':
      count += 1
    else:
        max_count = count if max_count < count else max_count  
        count = 0

max_count = count if max_count < count else max_count

print(max_count)

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

S = input()

ans = 0
cnt = 0
for s in S:
    if s == 'R':
        cnt += 1
        ans = max(ans,cnt)
    else:
        cnt = 0
print(ans)

Solution (Python):
a = list(input())
c = 0
x = []
for i in a:
    
    if i == 'R':
        c += 1
    else:
        x.append(c)
        c = 0
    x.append(c)
print(max(x))

Solution (Python):

import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import copy
import decimal


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


def solve():
    S = Scanner.string()
    if S == 'RRR':
        print(3)
    elif 'RR' in S:
        print(2)
    elif 'R' in S:
        print(1)
    else:
        print(0)


def main():
    
    
    solve()


if __name__ == "__main__":
    main()

Solution (Python):
s = input()
ans = s.count('R')
if s=='RSR':
  ans = 1
print(ans)

Solution (Python):
S = input()
ans = 0
x = 0
for s in S:
    if s == "R":
        x += 1
    else:
        x = 0
    ans = max(ans,x)
print(ans)

Solution (Python):
S=input()
if S=="RRR":
    print(3)
elif S=="RRS" or S=="SRR":
    print(2)
elif S=="RSS" or S=="SRS" or S=="SSR" or S=="RSR":
    print(1)
else:
    print(0)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()

    if "RRR" in S:
        ans = 3
    elif "RR" in S:
        ans = 2
    elif "R" in S:
        ans = 1
    else:
        ans = 0

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
s = input()
if s[0] == 'R' and s[1] == 'R' and s[2] == 'R':
    print('3')

elif s[0] == 'S' and s[1] == 'S' and s[2] == 'S':
    print('0')
    
elif s.count('R') == 2 and (s[0] == 'S' or s[2] == 'S'):
    print('2')

else:
    print('1')

Solution (Python):
S = input()
 
ans = 0
c = []
 
for i in range(len(S)):
    if S[i] =="R":
        ans += 1
    else:
        c.append(ans)
        ans = 0

c.append(ans)
 
print(max(c))

Solution (Python):
x = input()
a = [int(x[i]=='R') for i in range(3)]
s = sum(a)
if(s==2 and a[1]==0):
  s = 1
print(s)

Solution (Python):
S = input()

r = S.count('R')
if S[1] == 'S' and r == 2:
    r = 1

print(r)

Solution (Python):
s = input()
ans = 1 if "R" in s else 0
for i in range(1, 3):
    if s[i] == s[i - 1] == "R":
        ans += 1

print(ans)

Solution (Python):
s = input()
two =["RRS","SRR"]
if s =="RRR":
  print(3)
elif s in two:
  print(2)
elif s == "SSS":
  print(0)
else:
  print(1)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()

    if "RRR" in S:
        ans = 3
    elif "RR" in S:
        ans = 2
    elif "R" in S:
        ans = 1
    else:
        ans = 0

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(mi())


def main():
    s = input()
    cnt = 0
    if 'RRR' in s:
        print(3)
    elif 'RR' in s:
        print(2)
    elif 'R' in s:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
s = input()
tmp = 0
ans = 0
for t in s:
    if(t == 'R'):
        tmp += 1
        ans = max(tmp, ans)
    else:
        tmp = 0
print(ans)

Solution (Python):
s = input()
if s == 'RRR':
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
S = input()

ans = 0
_tmp = 0
for i in range(3):
    if S[i] == "R":
        _tmp += 1
        ans = max(ans, _tmp)
    else:
        ans = max(ans, _tmp)
        _tmp = 0

print(ans)

Solution (Python):
s = input().strip()
if s == 'RRR':
    print(3)
elif s == 'RRS' or s == 'SRR':
    print(2)
elif s == 'SSS':
    print(0)
else:
    print(1)

Solution (Python):
s = input()
ans = 1 if 'R' in s else 0
if s[0] == s[1] == 'R':
    ans += 1
if s[1] == s[2] == 'R':
    ans += 1
print(ans)

Solution (Python):
s = input()
if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else :
    print(0)

Solution (Python):
s = input()
ans = 0
if "R" in s:
    ans = 1
if "RR" in s:
    ans = 2
if "RRR" in s:
    ans = 3
print(ans)

Solution (Python):
s = input()
if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
s=input()
ans=0
for i in range(3):
    if s[i]=='R':
        c=1
        j=i+1
        while j<3 and s[j]=='R':
            c+=1
            j+=1
        ans=max(ans,c)

print(ans)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()

    if "RRR" in S:
        ans = 3
    elif "RR" in S:
        ans = 2
    elif "R" in S:
        ans = 1
    else:
        ans = 0

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
S = input()

if S == 'SSS':
	print('0')
elif S == 'RRR':
	print('3')
elif S == 'RRS':
	print('2')
elif S == 'SRR':
	print('2')
else:
	print('1')

Solution (Python):
S= str(input())

if "RRR" in S:
  print("3")
elif "RR" in S:
  print("2")
elif "R" in S:
  print("1")
else:
  print("0")

Solution (Python):
def main():
    S = input()
    ans = 0
    seq = 0
    for c in S:
        if c == "R":
            seq += 1
            ans = max(seq, ans)
        else:
            seq = 0
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()

    if "RRR" in S:
        print(3)
    elif "RR" in S:
        print(2)
    elif "R" in S:
        print(1)
    else:
        print(0)


if __name__ == "__main__":
    main()

Solution (Python):
in_data = list(input())
if in_data[0] == "R":
    if in_data[1] == "R":
        if in_data[2] == "R":
            print("3")
        else:
            print("2")
    else:
        print("1")
elif in_data[0] == "S":
    if in_data[1] == "R":
        if in_data[2] == "R":
            print("2")
        else:
            print("1")
    elif in_data[1] == "S":
        if in_data[2] == "R":
            print("1")
        else:
            print("0")

Solution (Python):
s = input("")
n = 0

if s[0] == "R":
    if s[1] == "R":
        if s[2] == "R":
            n = 3
        else:
            n = 2
    else:
        n = 1

elif s[1] == "R":
    if s[2] == "R":
        n = 2
    else:
        n = 1

elif s[2] == "R":
    n = 1

else:
    n = 0

print(n)

Solution (Python):
N=input()
X=0
Y=0
for i in range(len(N)):
  if N[i]=="R":
    X+=1
  else:
    Y=max([X,Y])
    X=0
print(max([X,Y]))

Solution (Python):
S=input()
if S=="RRR":
    print(3)
elif S=="RRS" or S=="SRR":
    print(2)
elif S.count("R")>0:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
cnt = 0

if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
s=input()
count=0
max=0
for i in range(len(s)):
  if s[i]=='R':
    count+=1
    max=count
  elif s[i]=='S':
    count=0
      
print(max)

Solution (Python):
s = input()
if "RRR" in s:
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
if s in ["SSS"]:
    print(0)
elif s in ["SSR", "SRS", "RSS", "RSR"]:
    print(1)
elif s in ["SRR", "RRS"]:
    print(2)
elif s in ["RRR"]:
    print(3)

Solution (Python):
S = input()
if S == "SSS":
    print(0)
elif S == "RRR":
    print(3)
elif S == "RRS" or S == "SRR":
    print(2)
else:
    print(1)

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
s = S()
ans = 0
max_R = 0
for c in s:
    if c == 'R':
        max_R += 1
        ans = max(ans, max_R)
    else:
        max_R = 0
print(ans)

Solution (Python):
S = input()
if "RRR" in S:
    print(3)
elif "RR" in S:
    print(2)
elif "R" in S:
    print(1)
else:
    print(0)

Solution (Python):
s=input()
count=0
max=0
for i in range(len(s)):
  if s[i]=='R':
    count+=1
    max=count
  elif s[i]=='S':
    count=0
      
print(max)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    s = S()
    cnt = 0
    first_done = False
    cont = True
    for c in s:
        if c == 'R' and cont:
            cnt += 1
            first_done = True
        else:
            if not first_done:
                continue
            else:
                cont = False
    print(cnt)


main()

Solution (Python):
s = input()
if s == 'RRR':
    print(3)
elif s == 'RRS' or s == 'SRR':
    print(2)
elif s == 'SSS':
    print(0)
else:
    print(1)

Solution (Python):
s = input()

for i in [3, 2, 1, 0]:
    if 'R'*i in s:
        print(i)
        break

Solution (Python):
s=input()
p=0
for i in s:
    if i=="R":
        p+=1
    if i=="S" and p>0:
        break
print(p)