#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
const long long inf = -1e18;
const long long INF = 1e18;
const long long mod = 1e9 + 7;
const double PI = acos(-1);
long long n, b, ans, a[N];
int main() {
  cin >> n >> b;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  ans = b;
  for (int i = 1; i <= n; i++) {
    for (int j = i; j <= n; j++) {
      if (a[j] > a[i]) {
        ans = max(ans, (b / a[i]) * a[j] + (b % a[i]));
      }
    }
  }
  cout << ans;
}
