X = int(input()) Y = int(input()) L = int(input()) def need(a,b): if a%b == 0: return abs(a)/b else: return abs(a)//b+1 c = need(X,L)+need(Y,L) sum = 0 if X != 0 and Y != 0: sum += 1 else: sum += 0 ans = c+sum print(ans)