stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define mst(a,b) memset(a,b,sizeof(a))

typedef long long ll;

ll a[10000];

int main()

{

    int n;

    while(~scanf("%d",&n))

    {

        ll sum=0;

        for(int i=0;i<=n-1;i++){

            cin>>a[i];

            sum+=a[i];

            sum--;

        }

        cout<<sum<<endl;

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.250976233235648x):
#include<cstdio>



int main()

{

	int n,num,ans;

	while(~scanf("%d",&n)){

		ans = 0;

		for(int i = 0; i<n; i++){

			scanf("%d",&num);

			ans += num - 1;

		}

		printf("%d\n",ans);

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std; 







int main()

{

	//freopen("D:\\patin.txt","r",stdin);

	int n;

	scanf("%d",&n);

	int sum = 0;

	int tmp;

	for(int i = 0;i < n;++i){

		scanf("%d",&tmp);

		sum += tmp-1;

	}	

	printf("%d\n",sum);

	return 0;	

} 

// Faster C++ solution for the same problem (measured speedup: 5.161362678368136x):
#include<cstdio>



int main()

{

	int n,num,ans;

	while(~scanf("%d",&n)){

		ans = 0;

		for(int i = 0; i<n; i++){

			scanf("%d",&num);

			ans += num - 1;

		}

		printf("%d\n",ans);

	}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main(){

	int n,m,ans=0;

	cin>>n;

	for(int i=0;i<n;i++){

		cin>>m;

		ans+=m;

	}

	cout<<ans-n;

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.217676099142307x):
#include<cstdio>



int main()

{

	int n,num,ans;

	while(~scanf("%d",&n)){

		ans = 0;

		for(int i = 0; i<n; i++){

			scanf("%d",&num);

			ans += num - 1;

		}

		printf("%d\n",ans);

	}

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main()

{

    int n, x, sum = 0;

    cin >> n;

    for(int i = 0; i < n; i++)

    {

        cin >> x;

        sum += x;

    }

    cout << sum-n << endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2261089858678975x):
#include<cstdio>



int main()

{

	int n,num,ans;

	while(~scanf("%d",&n)){

		ans = 0;

		for(int i = 0; i<n; i++){

			scanf("%d",&num);

			ans += num - 1;

		}

		printf("%d\n",ans);

	}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



#define mp make_pair

#define fi first

#define se second

#define pb push_back

#define all(x) (x).begin(),(x).end()

#define f1(i, n) for(int i=1;i<=n;i++)

#define f0(i, n) for(int i=0;i<n;i++)

#define ldb ldouble

#define inf 9999999999999999

#define mod 998244353

//#define mod 1000000007

#define int ll



typedef long long ll;

typedef unsigned long long ull;

typedef double db;

typedef long double ldb;

typedef pair <int, int> pii;

typedef pair <ll, ll> pll;

typedef pair <ll, int> pli;

typedef pair <db, db> pdd;



//**Start here**//



///declaration///



//library structure//

int a[100005],b[15][15],cnt[100005];

vector <int> g[15];



//variables//

int n,m,X,Y,ans=0;



//data structure//



///function///

//preset//



//input//

void input()

{

    cin >> n;

    for (int i=1;i<=n;++i)

    {

        cin >> a[i];

        ans+=a[i]-1;

    }

    cout << ans;

    return;

}



//algorithm//



//solve//

void solve()

{



    return;

}



//output//

void output()

{



    return;

}



///main///

signed main()

{

    ios_base::sync_with_stdio(0);

    cin.tie(0);

    cout.tie(0);

	//freopen("test.INP","r",stdin);

    //freopen("test.OUT","w",stdout);

    /*int test;

    cin >> test;

    for (int k=1;k<=test;++k)*/

    {

        input();

        solve();

        output();

    }

    return 0;

}



/**code-by-@datr1bs**/


// Faster C++ solution for the same problem (measured speedup: 5.285913035638098x):
#include<cstdio>



int main()

{

	int n,num,ans;

	while(~scanf("%d",&n)){

		ans = 0;

		for(int i = 0; i<n; i++){

			scanf("%d",&num);

			ans += num - 1;

		}

		printf("%d\n",ans);

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bitset>

#include <string>

using namespace std;

int main()

{

    long long sum = 0;

    int n;

    long long num;

    cin >> n;

    for(int i = 1;i <=n;i++)

    {

        cin >> num;

        sum+=num;

    }



    cout << sum - n << endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.236141249477208x):
#include<cstdio>



int main()

{

	int n,num,ans;

	while(~scanf("%d",&n)){

		ans = 0;

		for(int i = 0; i<n; i++){

			scanf("%d",&num);

			ans += num - 1;

		}

		printf("%d\n",ans);

	}

	return 0;

}
// Slower C++ solution:
#include <stdio.h>

#include <string.h>

#include<iostream>

#include<stack>

#include<cstring>

#include<algorithm>

using namespace std;

int main()

{

    int n,a[3002]= {0};

    cin>>n;

    for(int i=0; i<n; i++)

    {

        cin>>a[i];

    }

    sort(a,a+n);

    long long  Max=0;

    for(int i=0; i<n; i++)

    {

        Max+=a[i];

    }

    cout<<Max-n<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.26846273979583x):
#include<cstdio>



int main()

{

	int n,num,ans;

	while(~scanf("%d",&n)){

		ans = 0;

		for(int i = 0; i<n; i++){

			scanf("%d",&num);

			ans += num - 1;

		}

		printf("%d\n",ans);

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std;

const int maxn = 10000+10;

int a[maxn];

int gcd(int a,int b)

{

    return b==0?a:gcd(b,a%b);

}



int main()

{

    // cout<<gcd(12,8)<<endl;

    long long sum = 0;

    int n;

    cin>>n;

    for(int i=1;i<=n;i++)

    cin>>a[i],sum+=a[i];

    cout<<sum-n;

}


// Faster C++ solution for the same problem (measured speedup: 5.2161676420379095x):
#include<cstdio>



int main()

{

	int n,num,ans;

	while(~scanf("%d",&n)){

		ans = 0;

		for(int i = 0; i<n; i++){

			scanf("%d",&num);

			ans += num - 1;

		}

		printf("%d\n",ans);

	}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



int main(){

 int a;

 cin>>a;

 int sum =0,s;

 for(int i =0 ; i < a ; i++){

    cin >> s;

  sum+=s;

 }

  cout<<sum-a;

}


// Faster C++ solution for the same problem (measured speedup: 5.237548603088915x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



typedef long long int ll;





int main()

{



    int n;

    cin>>n;

    long long int m;

    ll a[n];



    ll s=0;

    for(int i=0;i<n;i++)

        {

            cin>>a[i];

            s=s+a[i]-1;

        }







    cout<< s;

}


// Faster C++ solution for the same problem (measured speedup: 5.248399881740144x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define mst(a,b) memset(a,b,sizeof(a))

typedef long long ll;

ll a[10000];

int main()

{

    int n;

    while(~scanf("%d",&n))

    {

        ll sum=0;

        for(int i=0;i<=n-1;i++){

            cin>>a[i];

            sum+=a[i];

            sum--;

        }

        cout<<sum<<endl;

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.270975567026351x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std; 







int main()

{

	//freopen("D:\\patin.txt","r",stdin);

	int n;

	scanf("%d",&n);

	int sum = 0;

	int tmp;

	for(int i = 0;i < n;++i){

		scanf("%d",&tmp);

		sum += tmp-1;

	}	

	printf("%d\n",sum);

	return 0;	

} 

// Faster C++ solution for the same problem (measured speedup: 5.18102070202595x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main(){

	int n,m,ans=0;

	cin>>n;

	for(int i=0;i<n;i++){

		cin>>m;

		ans+=m;

	}

	cout<<ans-n;

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.237548603088915x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main()

{

    int n, x, sum = 0;

    cin >> n;

    for(int i = 0; i < n; i++)

    {

        cin >> x;

        sum += x;

    }

    cout << sum-n << endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.246013608054801x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



#define mp make_pair

#define fi first

#define se second

#define pb push_back

#define all(x) (x).begin(),(x).end()

#define f1(i, n) for(int i=1;i<=n;i++)

#define f0(i, n) for(int i=0;i<n;i++)

#define ldb ldouble

#define inf 9999999999999999

#define mod 998244353

//#define mod 1000000007

#define int ll



typedef long long ll;

typedef unsigned long long ull;

typedef double db;

typedef long double ldb;

typedef pair <int, int> pii;

typedef pair <ll, ll> pll;

typedef pair <ll, int> pli;

typedef pair <db, db> pdd;



//**Start here**//



///declaration///



//library structure//

int a[100005],b[15][15],cnt[100005];

vector <int> g[15];



//variables//

int n,m,X,Y,ans=0;



//data structure//



///function///

//preset//



//input//

void input()

{

    cin >> n;

    for (int i=1;i<=n;++i)

    {

        cin >> a[i];

        ans+=a[i]-1;

    }

    cout << ans;

    return;

}



//algorithm//



//solve//

void solve()

{



    return;

}



//output//

void output()

{



    return;

}



///main///

signed main()

{

    ios_base::sync_with_stdio(0);

    cin.tie(0);

    cout.tie(0);

	//freopen("test.INP","r",stdin);

    //freopen("test.OUT","w",stdout);

    /*int test;

    cin >> test;

    for (int k=1;k<=test;++k)*/

    {

        input();

        solve();

        output();

    }

    return 0;

}



/**code-by-@datr1bs**/


// Faster C++ solution for the same problem (measured speedup: 5.306045432832974x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include <iostream>

#include <bitset>

#include <string>

using namespace std;

int main()

{

    long long sum = 0;

    int n;

    long long num;

    cin >> n;

    for(int i = 1;i <=n;i++)

    {

        cin >> num;

        sum+=num;

    }



    cout << sum - n << endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2560840814330545x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include <stdio.h>

#include <string.h>

#include<iostream>

#include<stack>

#include<cstring>

#include<algorithm>

using namespace std;

int main()

{

    int n,a[3002]= {0};

    cin>>n;

    for(int i=0; i<n; i++)

    {

        cin>>a[i];

    }

    sort(a,a+n);

    long long  Max=0;

    for(int i=0; i<n; i++)

    {

        Max+=a[i];

    }

    cout<<Max-n<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.288528674246296x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std;

const int maxn = 10000+10;

int a[maxn];

int gcd(int a,int b)

{

    return b==0?a:gcd(b,a%b);

}



int main()

{

    // cout<<gcd(12,8)<<endl;

    long long sum = 0;

    int n;

    cin>>n;

    for(int i=1;i<=n;i++)

    cin>>a[i],sum+=a[i];

    cout<<sum-n;

}


// Faster C++ solution for the same problem (measured speedup: 5.236034400741005x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int gcd (int a, int b) {

    while (a!=0 && b!=0) {

        if (a>b) {

            a=a%b;

        }

        else b=b%a;

    }

    return a+b;

}

int a[3009];

int main()

{

    int q,i,n,j,maxx = 0 , summ = 0;

    cin >> n;

    for(i=0;i<n;i++)

    cin>>a[i];

   sort(a , a + n);

   for(i=0;i<n;i++)

   {

       summ += a[i];

   }

   summ-=n;

   cout << summ;

}

// Faster C++ solution for the same problem (measured speedup: 5.240161520364709x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



#define M 1000000



bool isTrue(int val, vector<int> list) {

	

	for(int x: list) {

		if(val%x != x-1) {

			return false;

		}

	}

	return true;

}





void solve()

{	

	int n,num,m = INT_MIN,val;

	vector<int> list;

	cin >> n;

	while(n-- && cin >> num) {

		list.emplace_back(num);

		m = max(m,num);

	}

	//cout << m << endl;

	val = m-1;

	while(1) {

		if(isTrue(val, list)) {

			cout << val << endl;

			break;

		} 

		val += m;

	}

}



bool perfectSquare(long long int n) {

	double long s = sqrt(n);

	

	if(s == floor(s)) {

		return true;

	}

	return false;

}



void answer() {

	long long int len,num;

	vector<long long int> list;

	cin >> len;

	

	while(len-- && cin >> num) {

		list.emplace_back(num);

	}

	

	bool prime[M+1];

	

	memset(prime, true, sizeof(prime));

	

	for(int i=2;i<=sqrt(M);i++) {

		if(prime[i]) {

			for(int j=i*i;j<=M;j+=i) {

				prime[j] = false;

			}

		}

	}

	

	for(long long int x: list) {

		if(perfectSquare(x)) {

			long long int p = sqrt(x);

			if(prime[p]) {

				cout << "YES" << endl;

			} else {

				cout << "NO" << endl;

			}

		} else {

			cout << "NO" << endl;

		}

	}

}



void result() {

	long long int n,res=0,num;

	cin >> n;

	while(n-- && cin >> num) {

		res += num-1;

	}

	

	cout << res << endl;

}

			

		



int main() {

	ios::sync_with_stdio(0);

	cin.tie(0);

	result();

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.3479621554373225x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include <bits/stdc++.h>



#define ll long long int



using namespace std;



int main()

{

     ll n,i,j,s=0,x;

     cin>>n;

     for(i=0;i<n;i++)

     {

         cin>>x;

         s+=x;

     }

     cout<<s-n<<endl;

    return 0;

}








// Faster C++ solution for the same problem (measured speedup: 5.240987113352861x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define ll long long

int main()

{

    int n,sum=0;

    cin>>n;

    int a[n+5]={0};

    for(int i=0;i<n;i++)

    {

        cin>>a[i];

        sum+=a[i];

    }

    cout<<sum-n<<endl;

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.249403047663836x):
#include<stdio.h>

int main()

{

	int i,n,t=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); t+=a; }

	t-=n;

	printf("%d",t);

}
// Slower C++ solution:
#include <cstdio>

#include <cstdint>

#include <vector>

#include <algorithm>



int main() {

  size_t N;

  scanf("%zu", &N);



  std::vector<intmax_t> a(N);

  for (size_t i=0; i<N; ++i)

    scanf("%jd", &a[i]);



  intmax_t f=0;

  for (size_t i=0; i<N; ++i)

    f += a[i]-1;



  printf("%jd\n", f);

}


// Faster C++ solution for the same problem (measured speedup: 4.849535660681204x):
#include <cstdio>



int main() {

  int N;

  scanf("%d", &N);



  int res = 0;

  for (int i = 0; i < N; ++i) {

    int a;

    scanf("%d", &a);

    res += a-1;

  }

  printf("%d\n", res);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int a=0,b,c,d=0;

    cin>>b;

    for(int i=1;i<=b;i++)

    {

        cin>>c;

        a=a+c;

    }



    cout<<a-b;

}


// Faster C++ solution for the same problem (measured speedup: 5.226395855704787x):
#include <stdio.h>



int n, ans, x;



int main() {

  scanf("%d", &n);

  while (n--) {

    scanf("%d", &x);

    ans += (x - 1);

  }

  printf("%d\n", ans);

  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int a=0,b,c,d=0;

    cin>>b;

    for(int i=1;i<=b;i++)

    {

        cin>>c;

        a=a+c;

    }



    cout<<a-b;

}


// Faster C++ solution for the same problem (measured speedup: 5.223351600371551x):
#include<stdio.h>



int main(){

    int a;

    scanf("%d", &a);

    int b[a];

    for (int i=0;i<a;i++){

        scanf("%d", &b[i]);

    }

    int sum=0;

    for (int i=0;i<a;i++){

        sum=sum+b[i];

    }

    printf("%d\n", sum-a);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define endl "\n"



using namespace std;



int main(){

    long long n, a, total=0;

    cin >> n;

    for(long long i=0; i<n; i++){

        cin >> a;

        total+=a;

    }

    cout << total-n <<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.230534743271608x):
#include<stdio.h>



int main(){

    int a;

    scanf("%d", &a);

    int b[a];

    for (int i=0;i<a;i++){

        scanf("%d", &b[i]);

    }

    int sum=0;

    for (int i=0;i<a;i++){

        sum=sum+b[i];

    }

    printf("%d\n", sum-a);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int a=0,b,c,d=0;

    cin>>b;

    for(int i=1;i<=b;i++)

    {

        cin>>c;

        a=a+c;

    }



    cout<<a-b;

}


// Faster C++ solution for the same problem (measured speedup: 5.226446187390262x):
#include<stdio.h>

int main(){

  int n,a,c=0;

  scanf("%d",&n);

  while(n--)

  {

    scanf("%d",&a);

    c+=a-1;

  }

  printf("%d\n",c);

  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define endl "\n"



using namespace std;



int main(){

    long long n, a, total=0;

    cin >> n;

    for(long long i=0; i<n; i++){

        cin >> a;

        total+=a;

    }

    cout << total-n <<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.233633585960331x):
#include<stdio.h>

int main(){

  int n,a,c=0;

  scanf("%d",&n);

  while(n--)

  {

    scanf("%d",&a);

    c+=a-1;

  }

  printf("%d\n",c);

  return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

 //Compiler version g++ 6.3.0



 int main()

 {

 	int num;

 	cin >> num;

 	long sum=0;

 	while(num--){

 		int x;

 		cin >> x;

 		sum+=--x;

 	}

 	cout << sum << "\n";

 }

// Faster C++ solution for the same problem (measured speedup: 5.234515748251622x):
#include<stdio.h>

int main(){

  int n,a,c=0;

  scanf("%d",&n);

  while(n--)

  {

    scanf("%d",&a);

    c+=a-1;

  }

  printf("%d\n",c);

  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int a=0,b,c,d=0;

    cin>>b;

    for(int i=1;i<=b;i++)

    {

        cin>>c;

        a=a+c;

    }



    cout<<a-b;

}


// Faster C++ solution for the same problem (measured speedup: 5.2375268361748075x):
#include<stdio.h>

int main()

{

	int i,n,s=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); s+=a; }

	s-=n;

	printf("%d",s);

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define endl "\n"



using namespace std;



int main(){

    long long n, a, total=0;

    cin >> n;

    for(long long i=0; i<n; i++){

        cin >> a;

        total+=a;

    }

    cout << total-n <<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.244729472831405x):
#include<stdio.h>

int main()

{

	int i,n,s=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); s+=a; }

	s-=n;

	printf("%d",s);

}
// Slower C++ solution:
#include <iostream>

using namespace std;

 //Compiler version g++ 6.3.0



 int main()

 {

 	int num;

 	cin >> num;

 	long sum=0;

 	while(num--){

 		int x;

 		cin >> x;

 		sum+=--x;

 	}

 	cout << sum << "\n";

 }

// Faster C++ solution for the same problem (measured speedup: 5.245613505405133x):
#include<stdio.h>

int main()

{

	int i,n,s=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); s+=a; }

	s-=n;

	printf("%d",s);

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	int n,i,max=0;

	cin>>n;

	int a[n];

	for(i=0;i<n;i++){

		cin>>a[i];

		max+=a[i]; 

	} 

	max-=n;

	cout<<max<<endl;	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.245666464518486x):
#include<stdio.h>

int main()

{

	int i,n,s=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); s+=a; }

	s-=n;

	printf("%d",s);

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int N;



int main() {

    cin >> N;

    int a[N], sum = 0;

    for (int i = 0; i < N; i++) cin >> a[i];

    for (int k = 0; k < N; k++) {

        sum += a[k] - 1;

    }

    cout << sum << endl;

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.246664304944746x):
#include<stdio.h>

int main()

{

	int i,n,s=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); s+=a; }

	s-=n;

	printf("%d",s);

}
// Slower C++ solution:
#define debug 0

#define test 0

#define CPLUS 1

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include <math.h>

#include <string.h>

#if CPLUS

#include <iostream>

#include <stack>

#include <string>

#include <algorithm>

#include <vector>

#include <set>

#include <iterator>

#include <queue>

#include <map>

#include <unordered_map>

#include <functional>

#include <iomanip>

using namespace std;

#endif







int main(void)

{

#if debug

	freopen("in.txt", "r", stdin);

#endif

	int n;

	cin >> n;

	long long ans = 0;

	for (int i = 0; i < n; i++) {

		int tmp;

		scanf("%d", &tmp);

		ans += (tmp - 1);

	}

	printf("%lld\n", ans);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.240135710017366x):
#include<stdio.h>

int main()

{

	int i,n,s=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); s+=a; }

	s-=n;

	printf("%d",s);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int N;



int main()

{

	ios::sync_with_stdio(0);

	cin.tie(0);  cout.tie(0);



	cin >> N;

	int sum = 0;

	for( int i = 1; i <= N; i++) {

		int x;  cin >> x;

		sum += x-1;

	}



	cout << sum << endl;



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.311977135300814x):
#include<stdio.h>

int main()

{

	int i,n,s=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); s+=a; }

	s-=n;

	printf("%d",s);

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



int main() {

  int n; cin >> n;

  int sum = 0;

  while(n--) {

    int x; cin >> x;

    sum += x - 1;

  }

  cout << sum << '\n';

}


// Faster C++ solution for the same problem (measured speedup: 5.241190228952011x):
#include<stdio.h>

int main()

{

	int i,n,s=0;

	scanf("%d",&n);

	int a;

	for(i=0;i<n;i++) { scanf("%d",&a); s+=a; }

	s-=n;

	printf("%d",s);

}