x,y,l=int(input()),int(input()),int(input()) if y<0: n=2 elif x!=0: n=1 else: n=0 print(round(abs(y)/l+0.5)+round(abs(x)/l+0.5)+n)