Ideally, your 1099-R would come with that information available to you in Box 5. The amount shown in box 5 of the Form 1099-R provided
by the payer is the amount of the distribution that is tax free. It's
always best to enter the 1099-R exactly as it appears. then answer all the
questions.
As you enter your 1099-R, you will encounter the screen below. Click the one that is applicable to you.