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