#include <bits/stdc++.h>
using namespace std;
int prices[2001] = {0};
int main() {
  int n, b;
  cin >> n >> b;
  for (int i = 0; i < n; i++) cin >> prices[i];
  int maxTotal = b;
  int l = n - 1;
  for (int i = 0; i < l; i++) {
    int max = 0, maxPrice = 0, unit = b / prices[i], left = b % prices[i];
    for (int j = i + 1; j < n; j++) {
      int diff = prices[j] - prices[i];
      if (diff > max) {
        max = diff;
        maxPrice = prices[j];
      }
    }
    int total = unit * maxPrice + left;
    if (total > maxTotal) maxTotal = total;
  }
  cout << maxTotal << endl;
}
