#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, b;
  cin >> n >> b;
  int res = b, z = 0;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = n - 1; i >= 0; i--) {
    if (res < b + (b / a[i]) * (z - a[i])) {
      res = b + (b / a[i]) * (z - a[i]);
    }
    if (a[i] > z) {
      z = a[i];
    }
  }
  cout << res;
  return 0;
}
