str=input()
maxcnt=0
cnt=0
for i in range(len(str)):
  if(str[i]=="R"):
    cnt+=1
    maxcnt=max(cnt,maxcnt)
  else:
    cnt=0
    
print(maxcnt) str=input() str input() input maxcnt=0 maxcnt 0 cnt=0 cnt 0 for i in range(len(str)):
  if(str[i]=="R"):
    cnt+=1
    maxcnt=max(cnt,maxcnt)
  else:
    cnt=0
     i range(len(str)) range len(str) len str if(str[i]=="R"):
    cnt+=1
    maxcnt=max(cnt,maxcnt)
  else:
    cnt=0
     str[i]=="R" str[i] str i "R" cnt+=1 cnt 1 maxcnt=max(cnt,maxcnt) maxcnt max(cnt,maxcnt) max cnt maxcnt cnt=0 cnt 0 print(maxcnt) print maxcnt str=input() input() str cnt=0 0 cnt maxcnt=max(cnt,maxcnt) max(cnt,maxcnt) maxcnt cnt+=1 1 cnt cnt=0 0 cnt maxcnt=0 0 maxcnt
str=input()
maxcnt=0
cnt=0
for i in range(len(str)):
  if(str[i]=="R"):
    cnt+=1
    maxcnt=max(cnt,maxcnt)
  else:
    cnt=0
    
print(maxcnt)
