x,y,l=int(input()),int(input()),int(input()) if y<0: n=2 y=-y elif x!=0: n=1 else: n=0 if x<0: x=-x print(round(y/l+0.5)+round((x-1)/l+0.5)+n)