An analytical solution of stationary hydrodynamic equations of a main-sequence star