#include using namespace std; #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() //#define int long long #define ll long long #define ull unsigned long long #define ld long double #define vl vector #define vvl vector> #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++) #define drep(i, x) for (ll i = ((ll)(x)-1); i >= 0; i--) #define pll pair #define pb push_back #define mp make_pair #define mt make_tuple #define vvc vector> #define vc vector #define vvb vector> #define vb vector #define Maxe(x) *max_element(all(x)) #define Mine(x) *min_element(all(x)) #define Size(x) ((ll)(x).size()) #define umap unordered_map const long long INF = 1LL << 60; const long double pi = 3.1415926535897932; #define Fi first #define Se second int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; template inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } //lis,modpow,uf,modncr,soinsubunkai,yakusurekkyo //mint,dijkstra,gyakugen signed main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll n,k; cin>>n>>k; vl A(n); rep(i,n)cin>>A[i]; ll mini=Mine(A); ll res=0; rep(i,n){ ll now=k%A[i]; if(now