x=int(input()) y=int(input()) l=int(input()) ans=(y+l-1)//l if(x): ans += 1 + (x+l-1)//l print(ans)