import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int w = sc.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); } int[][] dp = new int[n + 1][w + 1]; dp[0][0] = 1; for (int i = 0; i < n; i++) { for (int j = 0; j <= w; j++) { dp[i + 1][j] += dp[i][j]; if (j >= a[i]) dp[i + 1][j] += dp[i][j - a[i]]; if (j >= a[i] / 2) dp[i + 1][j] += dp[i][j - a[i] / 2]; } } System.out.println(dp[n][w]); } }