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