#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
const int INF = 1000 * 1000 * 1000;
const int NMAX = 1000 * 1000;
long i, j, k, l, n, m, x, y, ans;
long a[3000];
int main() {
  freopen("out.deb", "w", stderr);
  scanf("%d %d", &n, &x);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  ans = x;
  for (i = 1; i <= n; i++) {
    for (j = i; j <= n; j++)
      if (a[j] * (x / a[i]) + (x % a[i]) > ans) {
        ans = a[j] * (x / a[i]) + x % a[i];
      }
  }
  printf("%d", ans);
  return 0;
}
