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