Ice Hockey World Championship

No attempts yetTime limit1sMemory limit1024 MB

Problem

This year the Ice Hockey World Championship was held in the Czech Republic. Bobek has arrived in Prague and wants to watch some of the matches. He has no favourite team and no scheduling constraints, so with enough money he could watch every match. His money is a fixed amount of Czech crowns, and he can spend all of it on tickets.

Given the ticket price of each match, count the ways Bobek can choose a set of matches without exceeding his budget. Two ways are different if some match is watched in one of them and not in the other. Watching no match at all counts as one way.

Input

The first line contains the number of matches NN and the amount of money Bobek can spend MM. (1N401 \le N \le 40, 1M10181 \le M \le 10^{18})

The second line contains the NN ticket prices separated by spaces. Each price is an integer between 11 and 101610^{16}.

Output

Print the number of ways on one line. Because of the limit on NN, this value never exceeds 2402^{40}.

Hint

When the prices are 100100, 15001500, 500500, 500500, 10001000 and the budget is 10001000, the eight ways are:

  • watch no match
  • the match worth 100100
  • the first match worth 500500
  • the second match worth 500500
  • the match worth 100100 and the first match worth 500500
  • the match worth 100100 and the second match worth 500500
  • both matches worth 500500
  • the match worth 10001000