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