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