#include "bits/stdc++.h" #define REP(i,n,N) for(int 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 ll mod=1e9+7; const int inf=1e9; int v[15]; int dp[1<<15]; int main() { int n; cin>>n; REP(i,0,n){ cin>>v[i]; } REP(mask,0,1<