import math X = int(input()) Y = int(input()) L = int(input()) cnt = 0 cnt += abs(math.ceil(X/L)) + abs(math.ceil(Y/L)) + 1 print(cnt)