from math import ceil def MIN(X, Y, L): if Y >= 0 and X == 0: return ceil(Y / L) elif Y >= 0 and X > 0: return ceil(Y / L) + 1 + ceil(abs(X) / L) elif Y < 0: return 1 + ceil(abs(X) / L) + 1 + ceil(abs(Y) / L) X = int(input()) Y = int(input()) L = int(input()) print(MIN(X, Y, L))