#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b;
  while (~scanf("%d%d", &n, &b)) {
    int a[2050];
    int m = -999;
    for (int i = 0; i < n; i++) scanf("%d", a + i);
    for (int i = 0; i < n - 1; i++) {
      int z = b / a[i];
      for (int j = i + 1; j < n; j++) {
        m = max(m, (a[j] - a[i]) * z + b);
      }
    }
    if (m > b)
      printf("%d\n", m);
    else
      printf("%d\n", b);
  }
  return 0;
}
