#include <bits/stdc++.h>
int i, n, b, a[2222], min[2222];
int main() {
  scanf("%d %d\n", &n, &b);
  for (i = 1; i <= n; ++i) scanf("%d", &a[i]);
  int m;
  min[1] = a[1];
  m = a[1];
  for (i = 2; i <= n; ++i) {
    if (m > a[i]) m = a[i];
    min[i] = m;
  }
  int max = 0;
  for (i = 1; i <= n; ++i) {
    int c = b / min[i];
    int t = b + c * (a[i] - min[i]);
    if (t > max) max = t;
  }
  printf("%d\n", max);
  return 0;
}
