An examination is made of an optimal standby problem. It is reduced to a nonlinear knapsack problem. A method based on the idea of dynamic programming and completely acceptable from the point of view of the expenditure of computational means is proposed for approximate solution (to a given degree of accuracy) of the latter problem.