p=[int(input()) for i in range(2)] x,y=map(abs,p) l=int(input()) r=0 r+=x//l if x%l==0 else x//l +1 r+=y//l if y%l==0 else y//l +1 if p[1] >= 0: r+=0 if x==0 else 1 else: r+=1 if y==0 else 2 print(r)