#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  vector<long long int> v;
  long long int n, b;
  cin >> n >> b;
  for (long long int i = 0; i < n; i++) {
    long long int t;
    cin >> t;
    v.push_back(t);
  }
  if (n == 0) {
    cout << (b) << endl;
    return 0;
  }
  long long int min = v[0], ans = b;
  for (long long int i = 1; i < n; i++) {
    long long int k = b / min;
    long long int c = b - k * min + k * v[i];
    if (ans < c) ans = c;
    if (min > v[i]) min = v[i];
  }
  cout << ans << endl;
  return 0;
}
