import math X=int(input()) Y=int(input()) L=int(input()) total = math.ceil(abs(Y)//L) if Y<0: total += 2 if X!=0: total += 1 total += math.ceil(abs(X)//L) print(total)