from math import ceil X,Y,L = int(input()),int(input()),int(input()) ans = ceil(abs(X)/L) + ceil(abs(Y)/L) if (X==0)and(Y<0):ans+=2 elif X!=0: ans+=1 if Y < 0:ans +=1 print(ans)