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 += 2 if y < 0 puts count