Student Loan: Pay back what's borrowed or amount spent?

I applied for an unsubsidized student loan from the William D Ford program. I will be a graduate student starting school this week. I took out 12K for this fall and for the spring. If I only use 11,500 would I still have to pay back the 12K that I borrowed or just the exact amount that I spent? Also if I only have to pay back the 11,500 can I use the rest of the money($500) as part of the repayment?

You pay back the entire amount that you borrowed.