#include <bits/stdc++.h>
long int n = 0, b = 0;
long double max = 0, min = 90000;
long double near = 0;
int main() {
  scanf("%d", &n);
  scanf("%d", &b);
  int temp;
  for (int i = 0; i < n; i++) {
    scanf("%d", &temp);
    if ((floor(b / min) * temp + b - floor(b / min) * min) > max) {
      max = (floor(b / min) * temp + b - floor(b / min) * min);
    }
    if (temp < min) {
      min = temp;
    }
  }
  if (max < b) {
    printf("%d\n", b);
  } else {
    printf("%d\n", (int)max);
  }
  return 0;
}
