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