X = int(input()) Y = int(input()) L = int(input()) cnt = 0 if Y < 0: cnt += 2 cnt += -(-abs(Y)//L) if X != 0: cnt += -(-abs(X)//L) elif Y > 0: cnt += -(-Y//L) if X != 0: cnt += 1 cnt += -(-abs(X)//L) print(cnt)