Problem: Given are a sequence A= {a_1,a_2,......a_N} of N positive even numbers, and an integer M.

Let a semi-common multiple of A be a positive integer X that satisfies the following condition for every k (1 \leq k \leq N):

* There exists a non-negative integer p such that X= a_k \times (p+0.5).



Find the number of semi-common multiples of A among the integers between 1 and M (inclusive).

Constraints

* 1 \leq N \leq 10^5
* 1 \leq M \leq 10^9
* 2 \leq a_i \leq 10^9
* a_i is an even number.
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N M
a_1 a_2 ... a_N


Output

Print the number of semi-common multiples of A among the integers between 1 and M (inclusive).

Examples

Input

2 50
6 10


Output

2


Input

3 100
14 22 40


Output

0


Input

5 1000000000
6 6 2 6 2


Output

166666667

Solution (in PYTHON):

Solution:
"""
for y in range(1, 32):
  for x in range(1, 32):
    ok = False
    for i in range(1, 10000):
      if i%y==0 and i/y%2!=0 and i%x==0 and i/x%2!=0:
        ok = True
        break
    print "#" if ok else ".",
  print
"""

"""
x = 1
for i in range(32):
  print x
  x = x*2+1
"""

from fractions import *

def check(x, y, d):
  #print x, y, d
  if x==y==d+1:
    return True
  if x==d+1 or y==d+1:
    return False
  return check(x%(d+1), y%(d+1), d/2)

N, M = map(int, raw_input().split())
a = [int(t)/2 for t in  raw_input().split()]

g = a[0]
for i in range(1, N):
  if not check(g, a[i], 1073741823):
    print 0
    exit(0)
  g = g*a[i]/gcd(g, a[i])
  if g>M:
    print 0
    exit(0)
print (M+g)/(2*g)

"""
 2: 1  3  5  7  9 11 13 15 17
 4: 2  6 10 14 18 22 26 30 34
 6: 3  9 15 21 27 33
 8: 4 12 20 28 36 44
10: 5 15 25 35 45 
12: 6 18 

  1 2 3 4 5 6
1 o x o x o x
2 x o x x x o
3 o x o x o 
4 x x x o
5 o x o
6 x o
"""