#include <bits/stdc++.h>
using namespace std;
int findGreatestElementIndexFrom(int arr[], int arr_size, int from) {
  int maximum = 0;
  for (int i = from; i < arr_size; i++) {
    if (arr[i] > maximum) {
      maximum = arr[i];
    }
  }
  return maximum;
}
int main() {
  int n, rubl;
  cin >> n >> rubl;
  int ans = rubl;
  int curency[n];
  for (int i = 0; i < n; i++) {
    cin >> curency[i];
  }
  for (int i = 0; i < n - 1; i++) {
    int dollars = rubl / curency[i];
    int remRubl = rubl % curency[i];
    int maxCurr = findGreatestElementIndexFrom(curency, n, i + 1);
    int helper = dollars * maxCurr + remRubl;
    if (ans < helper) ans = helper;
  }
  cout << ans;
  return 0;
}
