  We give a full and detailed solution of eighth Arnold's trivium problem. We
find critical points of a smooth function on a given one-parametric
two-dimensional surface with Lagrange multipliers method. Basic Morse theory
and Poincare-Hopf theorem makes it possible to determine a genus of this
surface and gives a beautiful training example of Morse surgery on a
two-dimensional surface of genus $g = 6$.
