#include <bits/stdc++.h>
int main() {
  int n, b;
  scanf("%d %d", &n, &b);
  int arr[2100];
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  int mxmx = b;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      int tempb = b;
      tempb = tempb % arr[i];
      int c = b / arr[i];
      tempb = tempb + (c * arr[j]);
      if (tempb > mxmx) {
        mxmx = tempb;
      }
    }
  }
  printf("%d\n", mxmx);
}
