import math X = int(input()) Y = int(input()) L = int(input()) cnt = 0 if Y >= 0: cnt = cnt + math.ceil(Y/L) if X != 0: cnt = cnt + 1 cnt = cnt + math.ceil(abs(X/L)) else: if X != 0: cnt = cnt + 1 cnt = cnt + math.ceil(abs(X/L)) cnt = cnt + 1 cnt = cnt + math.ceil(abs(Y/L)) print(cnt)