#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, b;
  cin >> n >> b;
  long long ans = b;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  for (long long i = 0; i < n - 1; i++) {
    long long coin = b / v[i];
    long long have = b - (coin * v[i]);
    auto it = max_element(v.begin() + i + 1, v.end());
    long long nmbr = *it;
    if (nmbr > v[i]) {
      have += (nmbr * coin);
      ans = max(ans, have);
    }
  }
  cout << ans << endl;
  return;
}
int main() {
  solve();
  return 0;
}
