x = gets.to_i y = gets.to_i l = gets.to_f count = (x.abs / l).ceil + (y.abs / l).ceil count += 1 if x != 0 count += 1 if y < 0 count += 1 if y < 0 && x == 0 puts count