import std.conv, std.stdio;
import std.algorithm, std.array, std.string, std.range;

enum mod = 998244353;
void main()
{
    immutable
        buf = readln.chomp.split.to!(size_t[]),
        n = buf[0],
        s = buf[1],
        a = readln.chomp.split.to!(size_t[]);
    auto dp = new ulong[][](n + 1, s + 1);
    // dp[i][p]: |{a⊂A[0..i) : ∑a = p}|
    // I know this is WA.
    dp[0][0] = 1;
    foreach (i, x; a)
    {
        foreach (p; 0..s+1)
        {
            dp[i+1][p] += dp[i][p];
            if (p + x <= s)
                dp[i+1][p+x] += dp[i][p];
        }
        foreach (p; 0..s+1)
            dp[i+1][p] %= mod;
    }
    dp[n][s].writeln;
}
