#include <bits/stdc++.h>
using namespace std;
int v[5000];
int main() {
  int n, b;
  scanf("%d %d", &n, &b);
  for (int i = 0; i < n; i++) scanf("%d", &v[i]);
  int vmin = v[0], profit = b;
  for (int i = 1; i < n; i++) {
    profit = max(profit, b / vmin * v[i] + b % vmin);
    vmin = min(vmin, v[i]);
  }
  printf("%d\n", profit);
  return 0;
}
