#include <bits/stdc++.h>
using namespace std;
const int N = 4000009;
int a[2002];
int main() {
  int n, b;
  cin >> n >> b;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int maxi = b;
  for (int i = 1; i <= n; i++) {
    for (int j = i; j <= n; j++) {
      int canbuy = b / a[i];
      int more = b % a[i];
      int cansell = canbuy * a[j] + more;
      if (cansell > maxi) {
        maxi = cansell;
      }
    }
  }
  cout << maxi;
  return 0;
}
