EastWest, NorthSouth, Length = [int(input()) for _ in range(3)] i = 0 if EastWest < 0: i += 1 if NorthSouth < 0: i += 1 L = Length EastWest = abs(EastWest) NorthSouth = abs(NorthSouth) i = EastWest // Length + 1 + NorthSouth // Length + 1 print(i)