X = int(input()) Y = int(input()) L = int(input()) import math def process_counter(X,Y,L): counter=0 if Y<0: counter+=2 else: counter+=1 counter+=math.ceil(Y/L) counter+=math.ceil(X/L) return counter print(process_counter(X,Y,L))