#include <bits/stdc++.h>
#define intt long long
using namespace std;
int i , j;
int main ()
{
    intt n,ans = 0;
    cin >> n;
    for ( i = 1 ; i <= n ; i++ )
    {
        int x;
        cin >> x;
        ans += x;
    }
    cout << ans-x << endl;
    return 0;
}
