#include <bits/stdc++.h>
using namespace std;
int n, b;
vector<int> arr(2005), v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> b;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  int maks = 0;
  v.push_back(b);
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      int tmp = b / arr[i];
      int total = b;
      total -= arr[i] * tmp;
      total += tmp * arr[j];
      v.push_back(total);
    }
  }
  cout << *max_element(v.begin(), v.end()) << '\n';
}
