#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 ans = b;
  for (int i = 0; i < n - 1; i++) {
    int min = INT_MAX, max = INT_MIN;
    for (int k = 0; k <= i; k++)
      if (min > a[k]) min = a[k];
    for (int k = i + 1; k < n; k++)
      if (max < a[k]) max = a[k];
    if (max > min && ans < max * (b / min) + b % min)
      ans = max * (b / min) + b % min;
  }
  cout << ans << endl;
  return 0;
}
