#include <bits/stdc++.h>
int main() {
  int n, b, mas[2001], ans;
  scanf("%d%d", &n, &b);
  ans = b;
  for (int i = 0; i < n; i++) scanf("%d", &mas[i]);
  for (int i = 0; i < n - 1; i++) {
    int k = b / mas[i], ost = b - k * mas[i];
    for (int j = i + 1; j < n; j++) ans = std::max(ans, ost + k * mas[j]);
  }
  printf("%d", ans);
  return 0;
}
