x = gets.to_f y = gets.to_f l = gets.to_f c = 0 c += 1 if x != 0 and y >= 0 c += 2 if y < 0 c += (x/l).abs.ceil c += (y/l).abs.ceil puts c