import math x = abs(int(input())) y = abs(int(input())) l = int(input()) execution_count = 0 if x != 0: execution_count += math.ceil(x / l) if x != 0 and y != 0: execution_count += 1 if y != 0: execution_count += math.ceil(y / l) print(execution_count)