#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k, b = 0, c, d, e, f, g, h = 0;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n - 1; i++) {
    c = 0;
    d = 2001;
    if (a[i + 1] > a[i]) {
      for (int j = 0; j <= (i + 1); j++) {
        c = a[i + 1];
        d = min(a[j], d);
        e = k / d;
        g = k % d;
        f = e * c + g;
        b = max(b, f);
      }
    }
  }
  cout << max(k, b);
  return 0;
}
