#include <bits/stdc++.h>
int main() {
  int day, money, i, M, m[2020], j;
  scanf("%d %d", &day, &money);
  int max = money;
  for (i = 1; i <= day; i++) {
    scanf("%d", &m[i]);
  }
  for (i = 1; i <= day; i++) {
    for (j = 1; j < i; j++) {
      M = (money / m[j]) * m[i] + (money - (money / m[j]) * m[j]);
      if (M > max) {
        max = M;
      }
    }
  }
  printf("%d\n", max);
  return 0;
}
