from math import ceil X = int(input()) Y = int(input()) L = int(input()) count = 0 if Y < 0 : count += 2 else: count += 1 print(abs(ceil(X/L))+abs(ceil(Y/L))+count)