The flight in a vertical plane of a ski-jumper after take-off was studied with the purpose of maximising flight distance. To solve the problem of optimal flight (how a jumper must change his angle of attack to obtain the longest jump) the basic theorem of the optimal control theory--Pontriagin's maximum principle--was applied. The calculations were based on data from wind tunnel experiments. It was shown that the maximum flight distance is achieved when the angle of attack is gradually increased according to a convex function the form of which depends on the individual aerodynamic parameters.