The retained earnings is part of the equity section that you can see in the balance sheet. The retained earnings is the accumulated earnings for all the previous years plus the results for this period less any dividend paid out of these reserves.
It is part of the equity but it is not related to the contributed capital.