#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, b, i, j, max, p = 0, mon, sh;
  cin >> n >> b;
  long long a[n];
  max = b;
  for (i = 0; i < n; ++i) cin >> a[i];
  for (i = 0; i < n; ++i) {
    sh = b / a[i];
    for (j = i + 1; j < n; ++j) {
      mon = sh * a[j] + b % a[i];
      if (mon > max) max = mon;
    }
  }
  cout << max;
}
