#include #include using namespace std; using ld = long double; #define _GLIBCXX_DEBUG #define REP(i,x) for(int i=0;i<(int)(x);i++) #define overload4(_1, _2, _3, _4, name, ...) name #define rep1(n) for(ll i = 0; i < (n); ++i) #define rep2(i, n) for(ll i = 0; i < (n); ++i) #define rep3(i, a, b) for(ll i = (a); i < (b); ++i) #define rep4(i, a, b, c) for(ll i = (a); i < (b); i += (c)) #define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__) #define vec(type,name,...) vector name(__VA_ARGS__) #define vv(type,name,h,...) vector>name(h,vector(__VA_ARGS__)) using ll = long long; long long MOD=1000000007; ll MOD2=998244353; const ll INF=0x1fffffffffffffff; using Graph = vector>; template using pq = priority_queue, greater>; int main() { ll N; cin>>N; vec(ll,A,40,0); vec(ll,B,N); rep1(N){ ll a; cin>>a; B[i]=a; A[a]=1;} ll ans=0; rep1(N){ if(A[B[i]-1]==0) ans+=B[i];} cout<