#include <bits/stdc++.h>
using namespace std;
vector<int> a;
int main() {
  int n, x, ans;
  cin >> n >> x;
  ans = x;
  a.resize(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
  }
  for (int i = 0; i < (int)(n); i++) {
    for (int j = i; j < n; j++) {
      ans = max(ans, (x / a[i]) * a[j] + (x % a[i]));
    }
  }
  cout << ans;
}
