#include using namespace std; #define rep(i,n) for(int i = 0; i < int(n); i++) int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int k,n,f; cin >> k >> n >> f; vector a(f); rep(i,f) cin >> a[i]; int sum = k*n; sort(a.begin(),a.end()); rep(i,f){ if(sum >= a[i]) sum -= a[i]; else{ cout << -1 << endl; return 0; } } cout << sum << endl; return 0; }