#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b;
  cin >> n >> b;
  int a;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    v.push_back(a);
  }
  int maxi = b;
  int suma = 0;
  int p;
  int res;
  for (int i = 0; i < v.size(); i++) {
    p = b / v[i];
    res = b % v[i];
    for (int j = i + 1; j < v.size(); j++) {
      if (v[j] < v[i]) continue;
      suma = p * v[j] + res;
      maxi = max(suma, maxi);
    }
  }
  maxi = max(suma, maxi);
  printf("%d\n", maxi);
}
