S = input()
count = 0
mcount = 0
for i in range(len(S)):
	if(S[i] == 'S'):
		count = 0
	elif(S[i] == 'R'):
		count += 1
		if(count>mcount):
			mcount = count
print(mcount)

 S = input() S input() input count = 0 count 0 mcount = 0 mcount 0 for i in range(len(S)):
	if(S[i] == 'S'):
		count = 0
	elif(S[i] == 'R'):
		count += 1
		if(count>mcount):
			mcount = count i range(len(S)) range len(S) len S if(S[i] == 'S'):
		count = 0
	elif(S[i] == 'R'):
		count += 1
		if(count>mcount):
			mcount = count S[i] == 'S' S[i] S i 'S' count = 0 count 0 elif(S[i] == 'R'):
		count += 1
		if(count>mcount):
			mcount = count S[i] == 'R' S[i] S i 'R' count += 1 count 1 if(count>mcount):
			mcount = count count>mcount count mcount mcount = count mcount count print(mcount) print mcount count += 1 1 count mcount = count count mcount count = 0 0 count S = input() input() S mcount = 0 0 mcount count = 0 0 count
S = input()
count = 0
mcount = 0
for i in range(len(S)):
	if(S[i] == 'S'):
		count = 0
	elif(S[i] == 'R'):
		count += 1
		if(count>mcount):
			mcount = count
print(mcount)


