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