X = abs(int(input())) Y = abs(int(input())) L = int(input()) count_x = count_y = x = y = 0 while X > x: count_x += 1 x += L while Y > y: count_y += 1 y += L if X==0 or Y==0: print(count_x+count_y) else: print(count_x+count_y+1)