Form 1099-SSA box 6 Federal Withholding - how is that calculated if the individual has Part A, Part B and Part D prescriptions

On Social Security Benefits Form 1099-SSA, individuals have the option to elect to have Federal Withholding be taken out.  My question is how box 6 calculated.  If they have Medicare and prescription do those amounts get subtracted first from the gross, and the Federal Withholding is determined after the deductions are subtracted out or is the Federal Withholding calculated on the entire Gross Amount which includes their benefit, medicare and prescription?

 

thank you in advance for your assistance.