#include <bits/stdc++.h>
int main() {
  long long int n, b, a[2009], i, j, last, amount;
  scanf("%lld %lld", &n, &b);
  for (i = 1; i <= n; i++) scanf("%lld", &a[i]);
  last = b;
  for (i = 1; i < n; i++) {
    for (j = i + 1; j <= n; j++) {
      amount = b / a[i];
      if (b - amount * a[i] + amount * a[j] > last)
        last = b - amount * a[i] + amount * a[j];
    }
  }
  printf("%lld\n", last);
  return 0;
}
