#include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 998244353
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL<<((ll)n))
#define SUBS(s,f,t) ((s).substr((f),(t)-(f)))
#define ALL(a) (a).begin(),(a).end()
#define Max(a) (*max_element(ALL(a)))
#define Min(a) (*min_element(ALL(a)))
using namespace std;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll a,b,c;cin>>a>>b>>c;
  a = (a*(a+1)/2)%MOD;
  b = (b*(b+1)/2)%MOD;
  c = (c*(c+1)/2)%MOD;

  cout<<(((a*b)%MOD)*c)%MOD<<endl; 
  return 0;
}

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int MAX_N = 46;
ll A[MAX_N];
vector<ll> B;

int main()
{
	ll N,T;
	cin >> N >> T;
	rep(i,N)
	{
		cin >> A[i];
	}

	for (int i = 0; i < (1 << (N/2)); ++i)
	{
		ll temp = 0;
		rep(j,N/2)
		{
			if (i & (1 << j)) temp += A[j];
		}
		B.push_back(temp);
	}

	sort(B.begin(), B.end());

	ll ans = 0;
	for (int i = 0; i < (1 << (N-N/2)); ++i)
	{
		ll temp = 0;
		rep(j,N-N/2)
		{
			if (i & (1 << j)) temp += A[j+N/2];
		}
		auto it = upper_bound(B.begin(), B.end(), T-temp);
		if (it != B.begin())
		{
			it--;
			temp += *it;
			ans = max(ans,temp);
		}
	}
	cout << ans << endl;
	return 0;
}