#include // #include using namespace std; // using namespace atcoder; using lint = long long; #define endl '\n' lint const mod = 1e9+7; //long const mod = 998244353; mapdp; lint maxx; lint n,m,p; lint a[200000]; mapcost; lint search(lint x){ if(x*maxx > m)return 1; if(dp[x] != 0)return dp[x]; lint tmp = 1<<30; for(auto pp: cost){ tmp = min(tmp, search(x*pp.second) + pp.first); } return dp[x] = tmp; } int main(){ cin >> n >> m >> p; for(int i=0;i> a[i]; sort(a,a+n); maxx = a[n-1]; for(int i=0;i 1)cost[c] = max(cost[c], a[i]); } if(cost.size() == 0){ if(m < maxx){ cout << 1 << endl; }else{ cout << -1 << endl; } return 0; } cout << search(1) << endl; }