#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int b;
  cin >> b;
  int A[n];
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  int B[n];
  int max = -9999999;
  int index1, index2;
  int min = 999999;
  int rem;
  int dollar;
  for (int i = 0; i < n; i++) {
    dollar = b / A[i];
    rem = b - (dollar * A[i]);
    for (int j = i; j < n; j++) {
      int ne = dollar * A[j];
      ne += rem;
      if (ne > max) {
        max = ne;
      }
    }
  }
  cout << max << endl;
  return 0;
}
