#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
int main() {
  int n, b, a[10000], i, j, ans = 0;
  cin >> n >> b;
  for (i = 0; i < n; i++) cin >> a[i];
  ans = b;
  for (i = 0; i < n; i++)
    for (j = i + 1; j < n; j++) {
      int ca = b % a[i] + b / a[i] * a[j];
      ans = max(ans, ca);
    }
  cout << ans;
  return 0;
}
