#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b;
  cin >> n >> b;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int Max = b;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) Max = max(Max, b / a[i] * a[j] + b % a[i]);
  cout << Max;
  return 0;
}
