x = abs(int(input())) y = abs(int(input())) l = abs(int(input())) step = int(x/l) + int(y/l) if x%l>0: step += 1 if y%l>0: step += 1 if x*y>0: step += 1 print(step)