#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, k;
  cin >> t >> k;
  long long s[t];
  for (int i = 0; i < t; i++) {
    cin >> s[i];
  }
  long long a[t], p[t];
  long long o = 9999999999, o1 = 0, o2 = 0, o3 = 0;
  for (int i = 0; i < t; i++) {
    o = min(o, s[i]);
    a[i] = o;
  }
  o = 0;
  for (int i = 0; i < t; i++) {
    o = max(o, s[t - 1 - i]);
    p[t - 1 - i] = o;
  }
  for (int i = 0; i < t; i++) {
    s[i] = k / a[i];
    s[i] = s[i] * p[i];
    s[i] = s[i] + k % a[i];
  }
  sort(s, s + t);
  o = max(k, s[t - 1]);
  cout << o << "\n";
}
