I’m failing AP Calc and can’t drop the class. What do I do?

I did horribly on the last exam and got an F. There are only 2 exams left and I have a D in the class right now. I cannot drop the class because of an AP Contract so I need some advice on what I can do at this point 😭