import math x=input() y=input() l=input() s=0 if y<0: s+=1 if x!=0 or y<0: s+=1 s+=math.ceil(1.*abs(x)/l) s+=math.ceil(1.*abs(y)/l) print int(s)