I am struggling with this question:
Let $X_n$ and $Y_n$ be positive integrable and adapted to $ {\mathscr{F}}_n$. Suppose that $E(X_{n+1} \mid \mathscr{F}_n) \le X_n+ Y_n$ with $\sum Y_n < \infty$ a.s. Prove that $X_n$ converges a.s. to a finite limit.
The hint is to consider the stopping time $N = \inf_k \sum_{m=1}^k Y_m > M$. My first question is why and how to come up with such stopping time? I try to construct supermartingale and use the convergence theorem. Any suggestion?