program knapsack_for_all_subsets
  implicit none
  integer :: n, s, i, j, k
  integer, dimension(3000) :: a = 0
  integer(8) :: dp(0:3000,0:3000) = 0, x = 0, p = 1
  integer(8) :: md = 998244353
  read(*,*) n, s
  read(*,*) a(1:n)
  dp(0,0) = 1
  do i = 1, n
    do k = i-1, 0, -1
      do j = s-a(i), 0, -1
        if (dp(j,k) < 0) cycle
        dp(j+a(i),k+1) = mod(dp(j+a(i),k+1)+dp(j,k),md)
      end do
    end do
  end do
  do i = n, 1, -1
    x = mod(x+p*dp(s,i),md)
    p = mod(p*2,md)
  end do
  write(*,'(i0)') x
end program knapsack_for_all_subsets