x=int(input()) y=int(input()) l=int(input()) ans=(abs(y)+l-1)//l if(x): ans += 1 + (abs(x)+l-1)//l print(ans)