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