#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, a[10001], i, j, k = 0, kk = 0;
  cin >> n >> b;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  int mn = 2e9, mx = -1, ans = b;
  for (i = 0; i < n; i++) {
    if (mn > a[i]) {
      mn = a[i];
      k = b / mn;
      kk = b % mn;
    }
    if (mn < a[i]) {
      mx = a[i];
      ans = max(mx * k + kk, ans);
    }
  }
  cout << ans;
}
