import math x=int(input()) y=int(input()) l=int(input()) direction=0 if x<0: direction+=1 if y<0: direction+=1 move=0 move+=math.ceil(abs(x)/l) move+=math.ceil(abs(y)/l) ans=direction+move print(ans)