program main implicit none integer a,b,c,x read(*,*)a,b,c if(60*a-b<=0)then write(*,*)-1 else write(*,*)3600*c/(60*a-b)+1 endif end program main