Either:
Use a variable and store the main chars EXP and give them to the new char. Don't forget to make the new char on level 1 as initialized.
Or:
Sum up all the EXP of all the chars in the party, divide them through the number of party members and just add that value to the new character's EXP. Again, don't forget to make the new char on level 1 as initialized.