x = gets.to_i.abs y = gets.to_i.abs l = gets.to_i ans = (x+l-1)/l + (y+l-1)/l ans += 1 if x!=0 puts ans