We consider the optimal stopping problem of maximizing the probability of stopping on any of the last m successes of a sequence of independent Bernoulli trials of length n, where m and n are predetermined integers such that 1 ≤ m < n. The optimal stopping rule of this problem has a nice interpretation, that is, it stops on the first success for which the sum of the m-fold multiplicative odds of success for the future trials is less than or equal to 1. This result can be viewed as a generalization of Bruss' (2000) odds theorem. Application will be made to the secretary problem. For more generality, we extend the problem in several directions in the same manner that Ferguson (2008) used to extend the odds theorem. We apply this extended result to the full-information analogue of the secretary problem, and derive the optimal stopping rule and the probability of win explicitly. The asymptotic results, as n tends to ∞, are also obtained via the planar Poisson process approach.