Retirement tax questions

But then I lose the HSA tax benefit if I sign up for Medicare while still working.