#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, bourles, a[2002];
  cin >> n >> bourles;
  long long MAX = bourles;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n - 1; i++) {
    int d = bourles / a[i];
    int b = bourles % a[i];
    for (int w = i; w < n; w++) {
      MAX = max(MAX, d * a[w] + b);
    }
  }
  cout << MAX;
}
