#include <bits/stdc++.h>
using namespace std;
int a[2010], B, N;
int main() {
  scanf("%d%d", &N, &B);
  for (int i = 1; i <= N; i++) scanf("%d", a + i);
  int res = B;
  int min = a[1];
  for (int i = 2; i <= N; i++) {
    int t = B / min * a[i] + B % min;
    res = res > t ? res : t;
    min = min < a[i] ? min : a[i];
  }
  printf("%d\n", res);
  return 0;
}
