#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, b;
  cin >> n >> b;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    for (long long j = i; j < n; j++) {
      long long cod = b / a[i];
      long long rem = b % a[i];
      long long tmp = rem + a[j] * cod;
      ans = max(ans, tmp);
    }
  }
  cout << ans << "\n";
}
