#include <bits/stdc++.h>
using namespace std;
const int MAX = 5e5 + 10, mod = 1e9 + 9, base = 41, INF = 1e9 + 10, sq = 502;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long long n, b;
  cin >> n >> b;
  long long a[n];
  for (long long i = 0; i < (n); ++i) cin >> a[i];
  long long maximum = b;
  for (long long i = 0; i < (n); ++i) {
    for (int j = i; j < n; j++) {
      long long buy = b / a[i];
      long long more = b % a[i];
      long long sell = a[j] * buy + more;
      if (sell > maximum) maximum = sell;
    }
  }
  cout << maximum << endl;
  return 0;
}
