#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, b;
  cin >> n >> b;
  long long a[n];
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  long long ans = b;
  for (long long i = 0; i < n; ++i) {
    for (long long j = i + 1; j < n; ++j) {
      long long x = (b / a[i]) * a[j] + b % a[i];
      ans = max(ans, x);
    }
  }
  cout << ans;
  return 0;
}
