x=int(input());y=int(input());l=int(input()) a=1*(x>0)+1*(x<0) a+=(abs(x)+l-1)//l a+=1*(y<0)+1*(x==0 and y<0) a+=(abs(y)+l-1)//l print(a)