#pragma region header
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n)for(int i=0;i<(n);i++)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
#define int ll
#define each(i, a) for (auto &&i : (a))
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
using vvs = vector<vs>;
using vd = vector<ld>;
using vvd = vector<vd>;
using vb = vector<bool>;
using vvb = vector<vb>;
using P = pair<int, int>;
using vp = vector<P>;
using int128 = __int128_t;//cin coutはできない
template <class T>
using greater_queue = priority_queue<T, vector<T>, greater<T>>;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a / gcd(a, b) * b;};
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

template <class T>
void CVEC(const T &v) {
	int c = v.size() - 1;
	for (int i = 0; i < c; i++) cout << v[i] << ' ';
	if (c > -1) cout << v[c];
	cout << '\n';
}

#pragma endregion header

signed main(){
    int n, m; cin >> n >> m;
	set<int> a, b;
	rep(i,n){
		int t; cin >> t;
		a.insert(t);
	}
	rep(i,m){
		int t; cin >> t;
		b.insert(t);
	}
	for(int i = 1; i <= 1000; i++){
		bool isA = a.count(i);
		bool isB = b.count(i);
		if(isA && isB) continue;
		if(!isA && !isB) continue;
		cout << i << endl;
	}
}
#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, k, m;
  cin >> n >> k >> m;
  int s = 0;
  int A;
  for(int i = 0; i < n - 1; i++){
    cin >> A;
    s += A;
  }
  int B = n*m - s;
  if(B > k){
    cout << -1;
  }
  else if(B < 0){
    cout << 0;
  }
  else{
    cout << B;
  }
}