#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, b;
  cin >> n >> b;
  std::vector<long long int> v(n);
  long long int maxp = 0, minp = 0;
  long long int m1, m2 = 0;
  for (long long int i = 0; i < n; ++i) {
    cin >> v[i];
    if (i == 0) m1 = v[i];
    if (m2 < v[i]) {
      maxp = i;
      m2 = v[i];
    }
    if (m1 > v[i]) {
      minp = i;
      m1 = v[i];
    }
  }
  std::vector<long long int> v2(v.begin(), v.end());
  sort(v2.begin(), v2.end(), greater<long long int>());
  long long int currmax = 0, ans = 0;
  if (v == v2 || maxp == minp) {
    cout << b;
  } else {
    if (maxp > minp) {
      ans = b / m1 * m2 + b % m1;
      cout << ans;
    } else if (maxp < minp) {
      for (long long int i = 0; i < n - 1; ++i) {
        long long int maxi = v[i];
        for (long long int j = i + 1; j < n; ++j) {
          if (v[j] > maxi) {
            maxi = v[j];
          }
        }
        ans = b / v[i] * maxi + b % v[i];
        if (ans > currmax) {
          currmax = ans;
        }
      }
      cout << currmax;
    }
  }
  return 0;
}
