#include <bits/stdc++.h>
using namespace std;
const int maxn = 2010;
int n, b, data[maxn];
int main() {
  scanf("%d%d", &n, &b);
  for (int i = 1; i <= n; i++) scanf("%d", &data[i]);
  int ans = b;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      ans = max(ans, b / data[i] * data[j] + b % data[i]);
  printf("%d\n", ans);
  return 0;
}
