program abc175a
  implicit none
  integer ans,c,i 
  character(len=10) str
  read(*,'(a)') str
  ans=0
  c=0
  do i=1,len(str)
     if(str(i:i)=='R') then
        c=c+1
     else
        c=0
     end if
     ans=max(ans,c)
  end do
  print*,ans
end program abc175a