410091: GYM103940 H How Many Laughs

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

H. How Many Laughstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

When it comes to numbers there are two rules that are common knowledge:

  • Some numbers are really funny.
  • Not all people consider the same number as funny.

For example, some people find the number 24 funny, while other people assures the number 25 is even funnier.

As with some other topics there are some funny number jokes that only experts on the topic find entertaining: if your funny number is 25 and your friend says 100, you find it funny as even when 100 is not your funny number, it is disguised! If you divide $$$100$$$ by $$$4$$$ it becomes your funny number!.

You are a funny numbers clown and will be presenting a funny numbers show tonight. This means you want to make people laugh with funny number jokes. As you want to be the best funny numbers clown in the city you do not want to expose yourself trying too hard to make people laugh, so you will not say a number greater than $$$X$$$. You will perform in front of your $$$N$$$ friends, all your friends are funny number experts and find entertaining a funny number joke. Because you are very close to each of your friends you know what is the number each of them finds funny.

Help yourself to know how many different numbers you can say tonight to make at least one of your friends laugh!

Input

The first line of input contains two integers separated by a space $$$N$$$ and $$$X$$$ ($$$1 \leq N \leq 20$$$, $$$1 \leq X \leq 10^9$$$) indicating respectively the number of friends in the show and the maximum number you can say.

The second and last line contains $$$N$$$ numbers separated by a space $$$a_i$$$ ($$$1 \leq a_i \leq 10^9$$$) where the $$$i$$$-th number represent the funny number of your $$$i$$$-th friend.

Output

Output a single line with an integer, indicating how many different numbers you can say tonight to make at least one of your friends laugh.

ExamplesInput
2 10
2 3
Output
7
Input
3 100
2 3 5
Output
74
Input
1 500
5
Output
100

加入题单

上一题 下一题 算法标签: