#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const ll MOD = 1e9 + 7;
const ll INF = 2e9;
const ld EPS = 1e-9;
void solve(long long testCase) {
  long long n, b;
  cin >> n >> b;
  long long a[n];
  long long mx = b;
  for (long long i = (0); i < (n); i++) cin >> a[i];
  for (long long i = (0); i < (n - 1); i++) {
    for (long long j = (i + 1); j < (n); j++) {
      mx = max(mx, b / a[i] * a[j] + b % a[i]);
    }
  }
  cout << mx;
}
void SetIO(string fileName, long long type, bool testCases) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  if ((long long)((fileName).size())) {
    switch (type) {
      case 1:
        freopen((fileName + ".in").c_str(), "r", stdin);
        freopen((fileName + ".out").c_str(), "w", stdout);
        break;
      case 2:
        freopen((fileName + ".inp").c_str(), "r", stdin);
        freopen((fileName + ".out").c_str(), "w", stdout);
        break;
        ;
    }
  }
  long long T_ = 1;
  if (testCases) {
    cin >> T_;
    for (long long i_ = (0); i_ < (T_); i_++) solve(i_ + 1);
  } else
    solve(T_);
}
int32_t main() { SetIO("", 1, 0); }
