#include "bits/stdc++.h" #define REP(i,n,N) for(ll i=(n); i<(N); i++) #define RREP(i,n,N) for(ll i=(N-1); i>=n; i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<> typedef long long ll; using namespace std; const int INF = 1e9; const int MOD = 1e9+7; const ll LLINF = 1e18; ll dp[1<<14]; vector A(15); int main(){ int N; cin>>N; REP(i,0,N){ cin>>A[i]; } REP(mask,0,1<