#include <bits/stdc++.h>

using namespace std;
#define pb push_back
#define LL long long
int main() {
    // freopen("in.txt","r",stdin);
   // freopen("out.txt","w",stdout);
    int T, x;
    //3
3 4 63
3 4 63
3 4 6
cin >> T;
   // while(T--) {
        int n, m;
        LL ans = 0;
        cin >> n;
        for(int i = 1; i <= n; ++i) {
            cin >> x;
            if(i != 1)
                ans += x;
        }
        cout << ans << "\n";
    //}

    return 0;
}
