#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = (1LL << 60);
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
int main()
{
    ll n;
    cin >> n;
    vector<pair<ll, ll>> x(n), y(n);
    rep(i, n) cin >> x[i].first >> y[i].first;
    rep(i, n)
    {
        x[i].second = i;
        y[i].second = i;
    }
    sort(x.begin(), x.end());
    sort(y.begin(), y.end());
    vector<ll> ans;
    if (x[n - 1].second == y[n - 1].second && x[0].second == y[0].second)
        ans.push_back(max(abs(x[n - 1].first - x[0].first), abs(y[n - 1].first - y[0].first)));
    else{
        ans.push_back(abs(x[n - 1].first - x[0].first));
        ans.push_back(abs(y[n - 1].first - y[0].first));
    }
    if (x[n - 1].second==y[n-1].second&&x[1].second==y[1].second)
        ans.push_back(max(abs(x[n - 1].first - x[1].first), abs(y[n - 1].first - y[1].first)));
    else{
        ans.push_back(abs(x[n - 1].first - x[1].first));
        ans.push_back(abs(y[n - 1].first - y[1].first));
    }
    if(x[0].second==y[0].second&&x[n-2].second==y[n-2].second)
        ans.push_back(max(abs(x[n - 2].first - x[0].first), abs(y[n - 2].first - y[0].first)));
    else{
        ans.push_back(abs(x[n - 2].first - x[0].first));
        ans.push_back(abs(y[n - 2].first - y[0].first));
    }

    sort(ans.begin(), ans.end());
    cout << ans[(int)ans.size()-2] << endl;
}
#include <bits/stdc++.h> 
#define rep(i,n) for(long long i = 0; i < (long long)(n); i++)
#define per(i,n) for(long long i = (long long)(n-1);i >= 0;--i)
#define REP(i,s,t) for(long long i=s;i<t;i++)
#define PER(i,s,t) for(long long i=s;i>t;--i)
#define all(x) x.begin(),x.end()
#define sp(n) setprecision(n)
typedef long long ll;
using namespace std;
int main(){
  int n,k,m;
  cin>>n>>k>>m;
  int l=0;
  rep(i,n-1){int j;
             cin>>j;
             l+=j;}
  if(l+k<n*m){cout<<-1<<endl;}
  else cout<<max((n*m-l),0)<<endl;
}