#include using namespace std; int main() { int n, sum=0, u; cin >> n; for (int i=0; i> t; sum+=t; } cin >> u; printf("%d\n", sum-u); return 0; }