#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,k,m;
  cin>>n>>k>>m;
  vector<int> v(n-1);
  int l=0;
  for(int i=0;i<n-1;i++){
    cin>>v[i];
    l+=v[i]-m;
  }
  l-=m;
  if(l>=0) cout<<0<<endl;
  else if(-1*l<=k) cout<<-1*l<<endl;
  else cout<<-1<<endl;
}
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, k, m; scanf("%d%d%d", &n, &k, &m);
	int sum = 0;
	for (int i = 0; i < n-1; i++) {
		int x; scanf("%d", &x);
		sum += x;
	}

	for (int i = 0; i <= k; i++) {
		if ((sum + i) / n >= m) {
			return !printf("%d\n", i);
		}
	}

	printf("-1\n");
}