#include <bits/stdc++.h>
using namespace std;
int N, B, A[2005];
int main() {
  int i, j, Min, Res = 0;
  cin >> N >> B;
  for (i = 0; i < N; i++) cin >> A[i];
  for (i = 1; i < N; i++) {
    Min = INT_MAX;
    for (j = 0; j < i; j++)
      if (A[j] != 0) Min = min(A[j], Min);
    if (Min > A[i]) continue;
    Res = max((B / Min) * A[i] + (B % Min), Res);
  }
  Res = max(Res, B);
  cout << Res << endl;
  return 0;
}
