#include <bits/stdc++.h>
int a[2010];
int main() {
  int n, b, i, u, money, max = -2 * (10 ^ 9), remain;
  scanf("%d%d", &n, &b);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  for (i = 0; i < n - 1; i++) {
    for (u = i + 1; u < n; u++) {
      remain = b % a[i];
      money = b / a[i];
      money = money * a[u] + remain;
      if (money > max) max = money;
    }
  }
  if (max < b)
    printf("%d\n", b);
  else
    printf("%d\n", max);
  return 0;
}
