#include <bits/stdc++.h>
using namespace std;
const int inf = (1 << 30) - 1;
int main() {
  int v[2002];
  ios_base::sync_with_stdio(false);
  int n, b;
  cin >> n >> b;
  int ans = -1;
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++) {
    int top = -1;
    for (int j = i + 1; j < n; j++) {
      top = max(top, v[j]);
    }
    int buy = b / v[i];
    int rest = b % v[i];
    int sell = buy * top;
    ans = max(ans, rest + sell);
  }
  cout << max(b, ans) << endl;
  return 0;
}
