stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<cstring>

#include<cstdlib>

#include<algorithm>

#include<string>

#include<stack>

//#define ll long long

using namespace std;

const int maxn=100;

const int INF=1000000000;

string str1,str2;



int main()

{

    cin>>str1>>str2;

    cout<<str2<<str1;

}


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



int main()

{

	char S[100];

	char T[100];

	scanf("%s %s", &S,&T);

	getchar();

	printf("%s%s", T, S);

	

	

	return 0;

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

using namespace std;



int main()

{

    string s1,s2;

    cin>>s1>>s2;

    cout<<s2+s1<<endl;



    return 0;

}


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



int main()

{

	char S[100];

	char T[100];

	scanf("%s %s", &S,&T);

	getchar();

	printf("%s%s", T, S);

	

	

	return 0;

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

using namespace std;

int main()

{

    string s,t;

    cin>> s>> t;

    cout<< t<<s;

}


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



int main()

{

	char S[100];

	char T[100];

	scanf("%s %s", &S,&T);

	getchar();

	printf("%s%s", T, S);

	

	

	return 0;

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



using namespace std;



int main()

{

    string s,t;

    cin>>s;

    cin>>t;

    cout<<t+s;

}

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



int main()

{

	char S[100];

	char T[100];

	scanf("%s %s", &S,&T);

	getchar();

	printf("%s%s", T, S);

	

	

	return 0;

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

#include <iostream>

#include<string>

using namespace std;

int main(){

	string T,S;

	cin>>S>>T;

	cout<<T<<S;

	return 0;





}

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

int main(){

  char S[100], T[100];

  scanf("%s %s", S, T);

  printf("%s%s \n",T, S);

  return 0;

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

#include<string.h>

using namespace std;



void function(char *s,char *t)

{

    strcat(t,s);

    cout<<t<<endl;

}



int main()

{

    char s[500];

    char t[500];

    cin>>s;

    cin>>t;

    function(s,t);

    return 0;

}


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

int main(){

  char S[100], T[100];

  scanf("%s %s", S, T);

  printf("%s%s \n",T, S);

  return 0;

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

using namespace std;



int main(){



    string s1,s2;

    cin>>s1>>s2;

    string m="";

    m=m+s2;

    m=m+s1;

   /// m=m+'\0';

    cout<<m<<endl;









    return 0;

}




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

int main(){

  char S[100], T[100];

  scanf("%s %s", S, T);

  printf("%s%s \n",T, S);

  return 0;

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

using namespace std;

int main()

{

    string s,t;

    cin>>s>>t;

    cout<<t<<s<<endl;

}


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

int main(){

  char S[100], T[100];

  scanf("%s %s", S, T);

  printf("%s%s \n",T, S);

  return 0;

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

using namespace std;

string s, t;

int main() {

    cin >> s >> t;

    cout << t << s << "\n"  ;

    return 0;

}

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

int main(){

  char S[100], T[100];

  scanf("%s %s", S, T);

  printf("%s%s \n",T, S);

  return 0;

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

#include<cstdio>

#include<cstring>

#include<cstdlib>

#include<algorithm>

#include<string>

#include<stack>

//#define ll long long

using namespace std;

const int maxn=100;

const int INF=1000000000;

string str1,str2;



int main()

{

    cin>>str1>>str2;

    cout<<str2<<str1;

}


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

int main(){

  char S[100], T[100];

  scanf("%s %s", S, T);

  printf("%s%s \n",T, S);

  return 0;

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

using namespace std;



int main()

{

    string s1,s2;

    cin>>s1>>s2;

    cout<<s2+s1<<endl;



    return 0;

}


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

int main(){

  char S[100], T[100];

  scanf("%s %s", S, T);

  printf("%s%s \n",T, S);

  return 0;

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

using namespace std;

int main()

{

    string s,t;

    cin>> s>> t;

    cout<< t<<s;

}


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

int main(){

  char S[100], T[100];

  scanf("%s %s", S, T);

  printf("%s%s \n",T, S);

  return 0;

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



using namespace std;



int main()

{

    string s,t;

    cin>>s;

    cin>>t;

    cout<<t+s;

}

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

int main(){

  char S[100], T[100];

  scanf("%s %s", S, T);

  printf("%s%s \n",T, S);

  return 0;

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

#include <iostream>

#include<string>

using namespace std;

int main(){

	string T,S;

	cin>>S>>T;

	cout<<T<<S;

	return 0;





}

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

int main (){

	

	char S[101], T[101];

	scanf("%s %s", S, T);

	printf("%s%s", T, S);







	return 0;

	

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

#include<string.h>

using namespace std;



void function(char *s,char *t)

{

    strcat(t,s);

    cout<<t<<endl;

}



int main()

{

    char s[500];

    char t[500];

    cin>>s;

    cin>>t;

    function(s,t);

    return 0;

}


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

int main (){

	

	char S[101], T[101];

	scanf("%s %s", S, T);

	printf("%s%s", T, S);







	return 0;

	

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

using namespace std;



int main(){



    string s1,s2;

    cin>>s1>>s2;

    string m="";

    m=m+s2;

    m=m+s1;

   /// m=m+'\0';

    cout<<m<<endl;









    return 0;

}




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

int main (){

	

	char S[101], T[101];

	scanf("%s %s", S, T);

	printf("%s%s", T, S);







	return 0;

	

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

using namespace std;

int main()

{

    string s,t;

    cin>>s>>t;

    cout<<t<<s<<endl;

}


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

int main (){

	

	char S[101], T[101];

	scanf("%s %s", S, T);

	printf("%s%s", T, S);







	return 0;

	

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

using namespace std;

string s, t;

int main() {

    cin >> s >> t;

    cout << t << s << "\n"  ;

    return 0;

}

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

int main (){

	

	char S[101], T[101];

	scanf("%s %s", S, T);

	printf("%s%s", T, S);







	return 0;

	

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

#include<cstdio>

#include<cstring>

#include<cstdlib>

#include<algorithm>

#include<string>

#include<stack>

//#define ll long long

using namespace std;

const int maxn=100;

const int INF=1000000000;

string str1,str2;



int main()

{

    cin>>str1>>str2;

    cout<<str2<<str1;

}


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

int main (){

	

	char S[101], T[101];

	scanf("%s %s", S, T);

	printf("%s%s", T, S);







	return 0;

	

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

using namespace std;



int main()

{

    string s1,s2;

    cin>>s1>>s2;

    cout<<s2+s1<<endl;



    return 0;

}


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

int main (){

	

	char S[101], T[101];

	scanf("%s %s", S, T);

	printf("%s%s", T, S);







	return 0;

	

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

using namespace std;

int main()

{

    string s,t;

    cin>> s>> t;

    cout<< t<<s;

}


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

int main (){

	

	char S[101], T[101];

	scanf("%s %s", S, T);

	printf("%s%s", T, S);







	return 0;

	

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



using namespace std;



int main()

{

    string s,t;

    cin>>s;

    cin>>t;

    cout<<t+s;

}

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

int main (){

	

	char S[101], T[101];

	scanf("%s %s", S, T);

	printf("%s%s", T, S);







	return 0;

	

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

using namespace std;

int c[999999];

int main(){

      int a,q=0,i,mn=9999999;

      cin>>a;

      for (i=1;i<=a;++i){

            cin>>c[i];

            q+=c[i];

            mn=min(c[i],mn);

      }

      cout <<q+(mn-a)-mn;

}


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

int main()

{

    int n,i,sum=0,fn;

    scanf("%d",&n);

    int a[n];

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

    {

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

        sum=sum+a[i];

    }

    fn=sum-n;

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

    return 0;

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

using namespace std;

int c[999999];

int main(){

      int a,q=0,i,mn=9999999;

      cin>>a;

      for (i=1;i<=a;++i){

            cin>>c[i];

            q+=c[i];

            mn=min(c[i],mn);

      }

      cout <<q+(mn-a)-mn;

}


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

#include<math.h>

#include<string.h>

int main(){

    int n,i,sum=0;

    scanf("%d",&n);

    int a[n];

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

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

        sum+=a[i]-1;

    }

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

    return 0;

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

using namespace std;

int c[999999];

int main(){

      int a,q=0,i,mn=9999999;

      cin>>a;

      for (i=1;i<=a;++i){

            cin>>c[i];

            q+=c[i];

            mn=min(c[i],mn);

      }

      cout <<q+(mn-a)-mn;

}


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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

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

#include <algorithm>

#include <sstream>

#include <string>

#include <queue>

#include <cstdio>

#include <map>

#include <set>

#include <utility>

#include <stack>

#include <cstring>

#include <cmath>

#include <vector>

#include <ctime>

#include <bitset>

#include <assert.h>

#include <iomanip>

using namespace std;

#define pb push_back

#define sd(n) scanf("%d",&n)

#define sdd(n,m) scanf("%d%d",&n,&m)

#define sddd(n,m,k) scanf("%d%d%d",&n,&m,&k)

#define sld(n) scanf("%lld",&n)

#define sldd(n,m) scanf("%lld%lld",&n,&m)

#define slddd(n,m,k) scanf("%lld%lld%lld",&n,&m,&k)

#define sf(n) scanf("%lf",&n)

#define sff(n,m) scanf("%lf%lf",&n,&m)

#define sfff(n,m,k) scanf("%lf%lf%lf",&n,&m,&k)

#define ss(str) scanf("%s",str)

#define ansn() printf("%d\n",ans)

#define lansn() printf("%lld\n",ans)

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

#define r1(i,e) for(int i=1;i<=e;++i)

#define rn(i,e) for(int i=e;i>=1;--i)

#define mst(abc,bca) memset(abc,bca,sizeof abc)

#define lowbit(a) (a&(-a))

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

#define pii pair<int,int>

#define pll pair<long long,long long>

#define mp(aa,bb) make_pair(aa,bb)

#define lrt rt<<1

#define rrt rt<<1|1

#define X first

#define Y second

#define PI (acos(-1.0))

double pi = acos(-1.0);

typedef long long ll;

typedef unsigned long long ull;

typedef long double ld;

//const ll mod = 1000000007;

const double eps=1e-12;

const int inf=0x3f3f3f3f;

//const ll infl = 100000000000000000;//1e17

const int maxn=  2e6+20;

const int maxm = 5e3+20;

//muv[i]=(p-(p/i))*muv[p%i]%p;

inline int in(int &ret) {

    char c;

    int sgn ;

    if(c=getchar(),c==EOF)return -1;

    while(c!='-'&&(c<'0'||c>'9'))c=getchar();

    sgn = (c=='-')?-1:1;

    ret = (c=='-')?0:(c-'0');

    while(c=getchar(),c>='0'&&c<='9')ret = ret*10+(c-'0');

    ret *=sgn;

    return 1;

}

int a[maxn];

ll lcm(ll x,ll y)

{

    ll gcd = __gcd(x,y);

    return x/gcd*y;

}

int main() {

#ifdef LOCAL

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

//    freopen("output.txt","w",stdout);

#endif // LOCAL



    int n;

    sd(n);

    ll ans = 0;

    r1(i,n)sd(a[i]),ans += a[i] - 1;

    lansn();

    return 0;

}


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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

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

using namespace std;



int main()

{

    int n,x,ans=0;

    cin>>n;

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

    {

        cin>>x;

        ans+=x;

    }

    cout<<ans-n;

    return 0;

}


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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

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

#include<cstdio>

#include<vector>

using namespace std;



int main(){

	int i,j,n,*a;

	long long result=0;

	scanf("%d",&n);

	a=new int[n];

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

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

		result=result+a[i]-1;

	}

	printf("%lld",result);

	return 0;

	system("pause");

}

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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

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

#include <vector>

#include <algorithm>

#include <queue>

#define MAX_NUM 50001

#include <iomanip>

#include <string>

using namespace std;





int main()

{

    int ans=0,N,temp;

    cin>>N;

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

    {

        cin>>temp;

        ans+=temp-1;

    }

    cout<<ans;





}


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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

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

#include <stdio.h>

#include <math.h>

#include <algorithm>

#include <string>

#include <map>

#include <queue>

#include <vector>

#include <string.h>

using namespace std;

int a[3001];

int f[3000];

int main()

{

    int n;

    scanf("%d",&n);

    int sum = 0;

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

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

        sum+=(a[i]-1);

    }

    printf("%d",sum);

	return 0;

}


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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

}
// Slower C++ solution:
#define _CRT_SECURE_NO_WARNINGS

#include<iostream>

#include <vector>

#include<algorithm>

#include<string>

#include<string.h>

#include<math.h>

#include <cstdio>

#include <queue>

#include<stack>



using namespace std;



int main() {

	int n;

	long long x;

	cin >> n;

	int * a = new int[n];

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

	{

		cin >> a[i];

	}



	long long s = 0;

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

		s += a[j]-1;

	cout << s;

	return 0;

}


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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

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

#include<cstdio>

#include<queue>

#include<cstring>

#include<algorithm>

#include<vector>

#include<map>

#include<sstream>

typedef long long LL;

using namespace std;



LL a[3010];

int main()

{

    int n;

    scanf("%d",&n);

    int s=0;

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

        scanf("%lld",&a[i]),s+=a[i]-1;



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

    return 0;

}

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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

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

#include<cstdio>

#include<cstring>

using namespace std;

typedef long long ll;

ll num[23333];



int main()

{

	ll n;

	cin >> n;

	for(int i = 1;i <= n;i ++) cin >> num[i];

	ll x = 1,ans = 0;

	for(int i = 1;i <= n;i ++) ans += (num[i] - 1);

	cout << ans;

	return 0; 

}

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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

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

using namespace std;

main()

{

    int n,i,x;

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

    {

        int sum=0;

        for(i=0;i<n;i++) scanf("%d",&x),sum+=x-1;

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

    }

    return 0;

}

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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

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

#include<iostream>

using namespace std;

#define mn 100005

#define FLN "code"

#define endl "\n"

#define int long long

#define fi first

#define se second

#define inf 4444444444444444444

#define mod 1000000009

#define FOR(i, a, b) for (int i=a; i<(b); i++)

#define FOR0(i, a) for (int i=0; i<(a); i++)

#define FOR1(i, a) for (int i=1; i<=(a); i++)

#define codenhanh(); ios_base::sync_with_stdio(0) ,cin.tie(0),cout.tie(0);



int n,m,a[mn];

int ttl=0;

signed main()

{

	codenhanh();

	cin>>n;

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

	{

		cin>>a[i];

		ttl+=a[i];

		ttl-=1;

	}

	cout<<ttl;

	

	

return 0;

}


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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	return 0;

}
// Slower C++ solution:
// Enter Source:

#include <bits/stdc++.h>

#define MOD (1000000000+7)



typedef long long int lli;



using namespace std;



lli GCD(lli X, lli Y)

{

	if(X%Y == 0) return Y;

	else return GCD(Y,X%Y);

}



int main()

{

//	lli N;

//	cin >> N;

//	vector<lli> vec, ans;

//	for(lli i = 0; i < N; i++)

//	{

//		lli temp;

//		cin >> temp;

//		vec.push_back(temp);

//	}

//	

//	lli m = vec[1];

//	for(lli j = 1; j < N; j++) m = GCD(max(m,vec[j]),min(m,vec[j])); 

//	for(lli i = 1; i < N; i++)

//	{

//		lli gcd = vec[0];

//		for(int j = 0; j < N; j++)

//		{

//			if(i != j) gcd = GCD(max(gcd,vec[j]),min(gcd,vec[j]));

//			if(gcd < m) break;

//		}

//		if(gcd > m) m= gcd;

//	}

//	cout << m << endl;

	lli N, sum = 0;

	cin >> N;



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

	{

		lli temp;

		cin >> temp;

		sum += temp;

	}

	cout << sum -N << endl;

	return 0;

}




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

int main(){

	long long int n;

	long long int a[10100];

        long long int cnt=0;

	scanf("%lld",&n);

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

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

	    cnt+=a[i];

	}

	printf("%lld",cnt-n);

	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.225818223723566x):
#include<stdio.h>



int main()

{

    int n,ans=0,i,x;

    scanf("%d", &n);

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

        scanf("%d", &x);

        ans+=x-1;

    }

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

}
// 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.222983998460744x):
#include<stdio.h>



int main()

{

    int n;

    scanf("%d", &n);

    int a[n],sum1 = 0;

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

    {

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

        sum1+=a[i];

    }



    printf("%d\n",sum1-n);

    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.223704469285219x):
#include<stdio.h>

int main()

{

	

	

	int n;

	scanf("%d",&n);

	int arr[n+10];

	int i;

	int sum=0;

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

	{

		 

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

		 sum=sum+arr[i];

	}

	int max=sum-n;

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

	return 0;

}
// 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.234527065328424x):
#include<stdio.h>

int main()

{

	

	

	int n;

	scanf("%d",&n);

	int arr[n+10];

	int i;

	int sum=0;

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

	{

		 

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

		 sum=sum+arr[i];

	}

	int max=sum-n;

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

	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.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;



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.228486205463852x):
#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;

}