**34 人解决**，43 人已尝试。

**51 份提交通过**，共有 124 份提交。

**4.1** EMB 奖励。

**单点时限: **2.0 sec

**内存限制: **256 MB

People in Silverland use coins. They have coins of value Silverland dollar. One day Tony opened his money-box and found there were some coins. He decided to buy a very nice watch in a nearby shop. He wanted to pay the exact price (without change) and he known the price would not more than . But he didn’t know the exact price of the watch.

You are to write a program which reads and corresponding to the number of Tony’s coins of value then calculate how many prices (from to ) Tony can pay use these coins.

The first line of test case contains two integers , . The second line contains integers, denoting .

Output the answer on a single line.

Input

2 5 1 4 2 1

Output

4

**34 人解决**，43 人已尝试。

**51 份提交通过**，共有 124 份提交。

**4.1** EMB 奖励。

题目标签