x=int(input()) y=int(input()) l=int(input()) ans=0 if y<0: ans+=2 elif x!=0: ans+=1 ans+=(abs(x)+l-1)/l ans+=(abs(y)+l-1)/l print(int(ans))