Typically the attorney fees will come off the top - out of the gross settlement amount (before medical bills are paid). The good news is, according to what you say your contract says, you will receive not only the value of your bills being paid, but more in your pocket than your attorney. Congratulations on getting your case resolved!