S=input()

days=[]
day=0
for i in range(3):
  if S[i]=='R':
    day+=1
  else:
    day=0
  days.append(day)

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

days=[]
day=0
for i in range(3):
  if S[i]=='R':
    day+=1
  else:
    day=0
  days.append(day)

print(max(days))