X = int(input()) Y = int(input()) L = int(input()) X = abs(X) Y = abs(Y) cnt = Y//L + (0 if Y%L==0 else 1) if X>0: cnt+=1 cnt+= X//L + (0 if X%L==0 else 1) print(cnt)