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