Statistical game-theoretic model of the optimal labor resources distribution