How important are grades vs other factors for getting accepted into a military academy?

I really want to go to the US Naval Academy because I have always had a deep calling for the navy, but I know that there is only about a 4.4% acceptance rate. How important are grades to get accepted? I have a good amount of leadership roles and positions at my school (high EC positions, ASB, high Campus Ministry position). I have a good record and background? Do teacher recommendations help?

If you have any other information regarding this topic please feel free to add anything else. Thank you.