#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b;
  cin >> n >> b;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int maxEarn = b;
  for (int i = 1; i < n; i++) {
    int buyAt = a[i - 1];
    int sellAt = *max_element(a + i, a + n);
    int earnings = 0;
    if (buyAt < sellAt) earnings = sellAt * (b / a[i - 1]) + (b % buyAt);
    if (earnings > maxEarn) maxEarn = earnings;
  }
  cout << maxEarn;
  return 0;
}
