#include <bits/stdc++.h>
using namespace std;
int arr[2010], money, mn, mx, ans;
vector<pair<int, int> > tmp;
int main() {
  int n, b;
  cin >> n >> b;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    tmp.push_back(make_pair(arr[i], i));
  }
  sort(tmp.rbegin(), tmp.rend());
  for (int i = 0; i < n; i++) {
    mx = tmp[i].first, mn = 1e8;
    for (int j = 0; j < tmp[i].second; j++) {
      mn = min(mn, arr[j]);
    }
    money = b / mn;
    money *= mx;
    money += (b % mn);
    ans = max(ans, money);
  }
  cout << ans;
}
