import math def main(): X = int(input()) Y = int(input()) L = int(input()) ans = 0 if Y >= 0: ans = math.ceil(Y/L) if X != 0: ans += 1 # 右か左を向く ans += math.ceil(abs(X)/L) else: ans += 1 # 右か左を向く ans += math.ceil(abs(X)/L) ans += 1 # 南をむく ans = math.ceil(Y/L) print(ans) if __name__ == '__main__': main()