#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, a[2000], maxx, flag, t, k, mm[2000], j;
  while (~scanf("%d %d", &n, &b)) {
    memset(mm, 0, sizeof(mm));
    maxx = flag = t = k = j = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    for (int i = 0; i < n - 1; i++) {
      t = b / a[i];
      for (int j = i + 1; j < n; j++) {
        k = max(k, a[j] * t + b - t * a[i]);
      }
    }
    if (b > k)
      printf("%d\n", b);
    else
      printf("%d\n", k);
  }
  return 0;
}
