Let $G = (V, E)$ be a directed graph with negative edge weights and no cycles, and $L:V \to \mathbb [0, \infty[$ be a function defined over this graph. This graph represents all possible paths a particle can take to go from a starting node $s$ to a final node $t$. Every weight represents the amount of energy the particle loses when traversing an edge, and the particle cannot traverse an edge if it doesn't have the energy to do so (assume that the energy cannot be negative). The function $L(u)$ represents the energy boost the particle receives after reaching node $u$. If $L(s) = E$, find the maximum energy the particle can have when reaching the final node $t$.
I'm stuck at this problem. First, I tried to solve the alternative problem in which $L(u) = 0$ for every $u \in V \setminus s$, and came up with a solution with the Bellman-Ford algorithm. However, I don't see how could I use this result for the original problem. Maybe with a dynamic programming approach?