#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a v; for(Int i=0;i dp(MAX,-1); dp[0]=0; for(Int x:v){ for(Int j=MAX-x-1;j>=0;j--) if(~dp[j]) chmax(dp[j+x],dp[j]+1); } Int n; cin>>n; cout<