from math import ceil X = abs(int(input())) Y = abs(int(input())) L = int(input()) x = ceil(X/L) y = ceil(Y/L) if X==0 or Y==0: print(x+y) else: print(x+y+1)