#include using namespace std; int main(void) { int N,A,ans=0,v; cin >> N; for(int i=0;i> A; ans+=A; } cin >> v; cout << ans-v; }