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