#include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define Deghish ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
void solve() {
    int n,t;cin>>n>>t;
    vector<int>a(n);
    int l=1,h=1e9;
    for (auto &i:a)cin>>i;
    int ans=0;
    while (l<=h) {
        int mid=l+(h-l)/2;
        int x=0;
        for (auto i:a) {
            x+=mid/i;
        }
        if (x>=t) {
            ans=mid;
            h=mid-1;
        }
        else l=mid+1;

    }
    cout<<ans;
}
signed main() {
    Deghish
    int Tc = 1;//cin >> Tc;
    while (Tc--) {
        solve();
    }
    return 0;
}

