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