import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;

void main()
{
    auto nm = readln.split.to!(long[]);
    auto N = nm[0];
    auto M = nm[1];
    auto as = readln.split.to!(long[]);

    auto d = as[0];
    foreach (a; as[1..$]) {
        d = d / gcd(d, a) * a;
        if (d > M*2) {
            writeln(0);
            return;
        }
    }
    writeln(M/d + (d <= M ? 1 : 0));
}