x = gets.to_i y = gets.to_i l = gets.to_f a = 0 if x != 0 a += 1 end if y < 0 if x != 0 a += 1 else a += 2 end end puts (x.abs / l).ceil + (y.abs / l).ceil + a