#include <bits/stdc++.h>
using namespace std;
int a[3000], mi[3000];
int main() {
  int n, b, i;
  scanf("%d%d", &n, &b);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  mi[0] = a[0];
  for (i = 1; i < n; i++) mi[i] = min(mi[i - 1], a[i]);
  int s = 0, t;
  for (i = 0; i < n; i++) {
    if (a[i] > mi[i]) {
      t = b / mi[i] * a[i] + b % mi[i];
      if (t > s) s = t;
    }
  }
  if (s < b) s = b;
  printf("%d\n", s);
}
