#include int main(void){ int n; scanf( "%d", &n ); int a; int i = 0; long sum = 0; for( i = 0; i < n; i++ ){ scanf( "%d", &a ); sum += (long)a; } int v; scanf( "%d", &v ); printf( "%d\n", sum - v ); }