import math X = int(input()) Y = int(input()) L = int(input()) a = int(math.floor(X/L) + math.floor(Y/L)) b = 1 if (X != 0) else 0 print(a + b)