In this paper we consider the smooth functions with three critical values on two-dimensional sphere S^2, that possess only one saddle critical point (possibly degenerate) in addition to M local maxima and m minima. For the case when the number M + m − 1 is a prime, we calculate the number of topologically non-equivalent such functions.