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