program sample
    implicit none
    character(100)::s
    integer(8) :: i,j,m,n
    integer(8),allocatable :: x(:),y(:)
  
    read(*,*) s
    if(s .eq. 'RRR')then
        write(*,*)3
    elseif(s(1:2) .eq. 'RR' .or. s(2:3) .eq. 'RR')then
        write(*,*)2
    elseif(s .eq. 'SSS')then
        write(*,*)0
    else
        write(*,*)1
    end if

    
  
    stop
end program sample
  

