#include <bits/stdc++.h>
using namespace std;
int fx[] = {1, -1, 0, 0};
int fy[] = {0, 0, 1, -1};
int main() {
  int n, b;
  cin >> n >> b;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  int ans = b, m = arr[0];
  for (int i = 1; i <= n - 1; i++) {
    if (arr[i] <= m)
      m = arr[i];
    else {
      int x = b / m;
      int y = x * m;
      int a = x * arr[i];
      ans = max(ans, b - y + a);
    }
  }
  cout << ans;
}
