a,b,c = gets.split.map(&:to_i) a *= 60 c *= 60 * 60 puts (1..100000000000000).bsearch{|x| c+b*x <= a*x } || -1