x = int(input()) y = int(input()) l = int(input()) print((y+l-1)//l + (x!=0) + (x+l-1)//l)