#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, b;
  cin >> n >> b;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int mini = INT_MAX;
  int ans = INT_MIN;
  for (int i = 0; i < n; i++) {
    mini = min(mini, arr[i]);
    int x = (b / mini) * arr[i] + (b % mini);
    ans = max(ans, x);
  }
  cout << ans;
  return 0;
}
