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