Evolution of protoneutron stars and maximum mass of a neutron star