s=str(input())
count=0
L=[]
for i in range(0,len(s)):
	if(s[i]=="R"):
		count+=1
	else:
		count=0
	L.append(count)
print(max(L)) s=str(input()) s str(input()) str input() input count=0 count 0 L=[] L [] for i in range(0,len(s)):
	if(s[i]=="R"):
		count+=1
	else:
		count=0
	L.append(count) i range(0,len(s)) range 0 len(s) len s if(s[i]=="R"):
		count+=1
	else:
		count=0
	 s[i]=="R" s[i] s i "R" count+=1 count 1 count=0 count 0 L.append(count) L.append L append count print(max(L)) print max(L) max L L=[] [] L count=0 0 count s=str(input()) str(input()) s count+=1 1 count count=0 0 count
s=str(input())
count=0
L=[]
for i in range(0,len(s)):
	if(s[i]=="R"):
		count+=1
	else:
		count=0
	L.append(count)
print(max(L))