#include <bits/stdc++.h>
using namespace std;
int a[2100];
int main() {
  int n, b, i, j;
  while (scanf("%d%d", &n, &b) != EOF) {
    for (i = 1; i <= n; i++) scanf("%d", &a[i]);
    int now, max = b;
    for (i = 1; i <= n; i++)
      for (j = i + 1; j <= n; j++)
        if (a[j] > a[i]) {
          now = b / a[i] * a[j] + b % a[i];
          if (now > max) max = now;
        }
    printf("%d\n", max);
  }
  return 0;
}
