X,Y,L = input(),input(),input()
count = 0
if X != 0:count+=1
if Y < 0:count+=1
X,Y = abs(X),abs(Y) 
count += X / L
if X % L > 0:count += 1
count += Y / L
if Y % L > 0:count += 1
print count