import math x,y,l=[int(input()) for _ in range(3)] cnt=0 if y<0: cnt+=2 elif x: cnt+=1 cnt+=math.ceil(abs(y)/l) cnt+=math.ceil(abs(x)/l) print(cnt)