#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b;
  cin >> n >> b;
  int myarr[n];
  for (int a = 0; a < n; a++) {
    cin >> myarr[a];
  }
  int max1 = b;
  int sum = 0;
  int pcompra, pventa;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      int x = b / myarr[i];
      int y = b % myarr[i];
      sum = myarr[j] * x + y;
      if (sum > max1) {
        max1 = sum;
      }
    }
  }
  cout << max1;
  return 0;
}
