#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
void solve() {
  long long i, j, n, m, b;
  cin >> n >> b;
  long long bc = b;
  vector<long long> v;
  vector<long long> anss;
  for (i = 0; i < n; i++) {
    scanf("%lld", &m);
    v.push_back(m);
  }
  long long dif = -1;
  long long buy, sell;
  for (i = 0; i < n; i++) {
    for (j = i; j < n; j++) {
      if (v[j] > v[i]) {
        b = bc;
        long long amt = b / v[i];
        b = b % v[i];
        amt = amt * v[j];
        b += amt;
        anss.push_back(b);
      }
    }
  }
  if (anss.size() == 0) {
    cout << bc;
    return;
  }
  long long a = *max_element(anss.begin(), anss.end());
  if (a < bc)
    cout << bc;
  else
    cout << a;
}
int main() {
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
