#include<bits/stdc++.h> using namespace std; void e(int q,int w[100001],int r,int y,int i){ if(r<q){ cin>>w[r]; i+=w[r]; r++; } else{ sort(w,w+q); cout<<i-w[r]; return; }e(q,w,r,y,i); } int main(){ int q,w[100001],r=0,y,i=0; cin>>q; e(q,w,r,y,i); };