text: #include<bits/stdc++.h>
  using namespace std;
  using ll = long long;
  using pii = pair<int, int>;
  using pll = pair<ll, ll>;
  using vi = vector<int>;
  using vl = vector<ll>;
  using vii = vector<pii>;
  using vll = vector<pll>;
  #define fi first
  #define se second
  #define sz(c)  ((int)(c).size())
  #define all(c) (c).begin(), (c).end()
  #define forn(i, m, n)  for (int i = m, nnnn = (n); i < nnnn; ++i)
  #define pb  push_back
  #define mp  make_pair
  #define NIL 0
  #define INF INT_MAX
  #define int128 __int128_t
      
  void debug_out() { cerr << endl; }
      
  template <typename Head, typename... Tail>
  void debug_out(Head H, Tail... T) {
      cerr << " " << to_string(H);
      debug_out(T...);
  }
      
  #ifdef LOCAL
      #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
  #else
      #define debug(...) 42
  #endif
      
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  const long double eps = 1e-9;
  const long long mod = 1000000007;
  const int MAXN = 1000000;
  
  void solve(){
      long long n, k;
      cin >> n >> k;
      long long arr[n];
      forn(i, 0, n) cin >> arr[i];
      long long low = 0, high = __INT64_MAX__;
      while(low <= high){
          long long mid = (low + high)/2;
          long long t = 0;
          forn(i, 0, n) {
              t += mid/arr[i];
              if (t >= k) break;
          }
          if (t >= k) high = mid - 1;
          else low = mid + 1;
      }
      cout << low << '\n';
  }
      
  int main(){
      ios_base::sync_with_stdio(false);
      cin.tie(NULL);
      cout << setprecision(12) << fixed;
      solve();
  }