#include using namespace std; using ll=long long; using pll=pair; using tll=tuple; const ll INF=(1ll<<60); #define rep(i,n) for (ll i=0;i<(ll)(n);i++) #define all(v) v.begin(),v.end() template void chmin(T &a,T b){ if(a>b){ a=b; } } template void chmax(T &a,T b){ if(a> n >> m >> k; vector a(n); rep(i,n) cin >> a[i]; a.push_back(0); vector v; rep(i,n+1){ rep(j,n+1){ rep(k,n+1){ v.push_back(a[i]+a[j]+a[k]); } } } ll ans=0; sort(all(v)); for(auto &i:v){ if(m