#include <bits/stdc++.h>
using namespace std;
int b[2000];
int main() {
  int n, x;
  cin >> n >> x;
  for (int i = 0; i < n; i++) cin >> b[i];
  int best = x;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      best = max(best, x / b[i] * b[j] + x % b[i]);
  cout << best << endl;
}
