#include <bits/stdc++.h>
using namespace std;

template<int D, typename T>
struct Vec : public vector<Vec<D - 1, T>> {
  static_assert(D >= 1, "Vector dimension must be greater than zero!");
  template<typename... Args>
  Vec(int n = 0, Args... args) : vector<Vec<D - 1, T>>(n, Vec<D - 1, T>(args...)) {
  }
};
template<typename T>
struct Vec<1, T> : public vector<T> {
  Vec(int n = 0, const T& val = T()) : vector<T>(n, val) {
  }
};

template<int32_t Mod>
class ModInt {
public:
  using ModType = decltype(Mod);
  static constexpr int m = Mod;
 
  template<typename T> ModType mod(T n) const {
    if(n < 0 || n >= m) n %= m;
    if(n < 0) n += m;
    return static_cast<ModType>(n);
  } 
  template<typename T> ModInt pow(T p) const {
    ModInt res(1), a(*this);
    do {
      if(p & 1) res *= a;
      a *= a;
    } while(p >>= 1);
    return res;
  }
  ModInt inv() const {
    return pow(m - 2);
  }
 
  ModInt() = default;
  ModInt(const ModInt& other): val(other.val) {}
  template<typename T> ModInt(T n): val(mod(n)) {}
  ModInt& operator=(const ModInt& other) { val = other.val; return *this; }
 
  ModInt& operator+=(const ModInt& other) {
    if((val += other.val) >= m) val -= m; return *this; }
  ModInt& operator-=(const ModInt& other) {
    if((val -= other.val) < 0) val += m; return *this; }
  ModInt& operator*=(const ModInt& other) {
    val = mod((int64_t) (val) * (int64_t)(other.val)); return *this; }
  ModInt& operator/=(const ModInt& other) { return *this *= other.inv(); }
 
  ModInt& operator++() { return *this += 1; }
  ModInt& operator--() { return *this -= 1; }
  ModInt operator++(int) { ModInt ret(*this); *this += 1; return ret; }
  ModInt operator--(int) { ModInt ret(*this); *this -= 1; return ret; }
  ModInt operator+() const { return *this; }
  ModInt operator-() const { return ModInt(m - val); }
 
  ModInt operator+(const ModInt& other) const { return ModInt(*this) += other; }
  ModInt operator-(const ModInt& other) const { return ModInt(*this) -= other; }
  ModInt operator*(const ModInt& other) const { return ModInt(*this) *= other; }
  ModInt operator/(const ModInt& other) const { return ModInt(*this) /= other; }
 
  template<typename T> ModInt operator+(T other) const { return *this + ModInt(other); }
  template<typename T> ModInt operator-(T other) const { return *this - ModInt(other); }
  template<typename T> ModInt operator*(T other) const { return *this * ModInt(other); }
  template<typename T> ModInt operator/(T other) const { return *this / ModInt(other); }
  template<typename T> ModInt& operator+=(T other) { return *this += ModInt(other); }
  template<typename T> ModInt& operator-=(T other) { return *this -= ModInt(other); }
  template<typename T> ModInt& operator*=(T other) { return *this *= ModInt(other); }
  template<typename T> ModInt& operator/=(T other) { return *this /= ModInt(other); }
 
  template<typename T> friend
    ModInt operator+(T lhs, const ModInt& rhs) { return rhs + lhs; }
  template<typename T> friend
    ModInt operator-(T lhs, const ModInt& rhs) { return -rhs + lhs; }
  template<typename T> friend
    ModInt operator*(T lhs, const ModInt& rhs) { return rhs * lhs; }
  template<typename T> friend
    ModInt operator/(T lhs, const ModInt& rhs) { return ModInt(lhs) / rhs; }
 
  friend ostream& operator<<(ostream& os, const ModInt& m) { return (os << m.val); }
  friend istream& operator>>(istream& is, const ModInt& m) {
    int64_t n; is >> n; m.val = mod(n); return is; }
 
  explicit operator ModType() { return val; }
private:
  ModType val = 0;
};
using Mint = ModInt<998244353>;
constexpr int S = 3003;

int main() {
  ios::sync_with_stdio(0); cin.tie(0);
  int n, s;
  cin >> n >> s;
  Vec<1, int> a(n);
  for(int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  Vec<2, Mint> dp(n, S);
  // dp[i][s] := number of (x, y) x ss y ss a sum(x) = s
  dp[0][0] = 1;
  dp[0][a[0]] = 1;
  for(int i = 1; i < n; ++i) {
    dp[i][0] += 1;
    dp[i][a[i]] += 1;
    for(int j = 0; j <= s; ++j) {
      dp[i][j] += 2 * dp[i - 1][j] + (j >= a[i] ? dp[i - 1][j - a[i]] : 0);
    }
  }
  cout << dp[n - 1][s] << '\n';
}

Measured memory_bytes: 38532