import math x=int(input()) y=int(input()) z=int(input()) count=0 if y<0: count+=2 elif x!=0: count+=1 count+=math.ceil(abs(x)/z) count+=math.ceil(abs(y)/z) print(count)