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