#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, arr[2002];
  cin >> n >> b;
  for (int i = 0; i < n; i++) cin >> arr[i];
  if (n == 1) return cout << b, 0;
  int maxim = b;
  int maxi = 0;
  for (int i = n - 1; i >= 0; i--)
    if (arr[i] < maxi)
      maxim = max(maxim, (b / arr[i]) * maxi + (b % arr[i]));
    else if (arr[i] >= maxi)
      maxi = arr[i];
  return cout << maxim, 0;
}
