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