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