#include <bits/stdc++.h>
int A[2005];
int main() {
  int n, i, j, ans, b;
  while (scanf("%d %d", &n, &b) != EOF) {
    for (i = 0; i < n; i++) scanf("%d", &A[i]);
    ans = b;
    for (i = 0; i < n; i++)
      for (j = i + 1; j < n; j++) {
        int buy = b / A[i];
        int left = b - buy * A[i];
        int get = buy * A[j];
        if (get + left > ans) ans = get + left;
      }
    printf("%d\n", ans);
  }
  return 0;
}
