import math X= int(input()) Y= int(input()) L= int(input()) def step(X, Y, L): count= 0 if X != 0: count += 1 count += math.ceil(abs(X)/L) if Y < 0: count += 2 count += math.ceil(abs(Y)/L) elif Y > 0: count += math.ceil(abs(Y)/L) return print (count) step(X, Y, L)