The change of the critical conditions of a polymer in a presence of cosolute can be described by a mean-field theory as follows. All interactions within the theory are described by a virial expansion and the electroneutrality condition is postulated. We choose an NpT ensemble for the polymer which is in contact with a reservoir of cosolutes at a constant chemical potential. Cosolute molecules are allowed to exchange between the ensemble and the reservoir. At equilibrium the Gibbs free energy is minimized in such system. The polymer is simply modeled as an elastic, penetrable sphere that can change its radius upon the sorption of cosolutes. (Polymer conformational degrees of freedom are thus averaged out into an effective blob, like in the classical Flory approaches where only the polymer size is a variable.) Hence, the total Gibbs free energy of the polymer phase which is in a contact with a salt reservoir containing i cosolute constituents, i.e., anions and cations in our system, can be defined as