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 unless x==0 || y==0 puts ans