401k early withdrawal to pay for medical expenses. I can waive the penalty for excess of 7.5% agi. Does my AGI include the 401k funds? does it matter if i used fsa too?

Ex. w2 $50,000 401K withdrawl $10,000 Total Medical 10k FSA Towards Medical 2k. How much can I put for amount of 401k withdraw for medical expenses?