One day Vasya got hold of information on the Martian dollar course in bourles for the next n days. The buying prices and the selling prices for one dollar on day i are the same and are equal to ai. Vasya has b bourles. He can buy a certain number of dollars and then sell it no more than once in n days. According to Martian laws, one can buy only an integer number of dollars. Which maximal sum of money in bourles can Vasya get by the end of day n?

Input

The first line contains two integers n and b (1 ≤ n, b ≤ 2000) — the number of days and the initial number of money in bourles. The next line contains n integers ai (1 ≤ ai ≤ 2000) — the prices of Martian dollars.

Output

Print the single number — which maximal sum of money in bourles can Vasya get by the end of day n.

Examples

Input

2 4
3 7


Output

8


Input

4 10
4 3 2 1


Output

10


Input

4 10
4 2 3 1


Output

15
#include <bits/stdc++.h>
using namespace std;
struct NumberTheory {
  static const long long mod = 1e9 + 7;
  vector<long long> factorial = {1}, factorialInv = {1};
  inline long long mult(long long a, long long b, long long m = mod) {
    return (a * b) % m;
  }
  inline long long norm(long long x) {
    x %= mod;
    if (x < 0) x += mod;
    return x;
  }
  inline long long div(long long a, long long b) { return mult(a, inv(b)); }
  inline long long sub(long long a, long long b) { return norm(a - b); }
  inline long long add(long long a, long long b) { return (a + b) % mod; }
  long long ncr(long long n, long long r) {
    assert(n >= 0);
    if (r < 0 || n < r) return 0;
    return mult(fac(n), mult(finv(r), finv(n - r)));
  }
  long long npr(long long n, long long r) {
    assert(n >= 0);
    if (r < 0 || n < r) return 0;
    return mult(fac(n), finv(n - r));
  }
  long long finv(long long n) {
    long long last = factorialInv.size() - 1;
    if (last < n) {
      vector<long long> finv_temp(n - last);
      finv_temp[0] = inv(fac(n));
      for (long long i = 1; i < (long long)finv_temp.size(); i++) {
        finv_temp[i] = mult(finv_temp[i - 1], n - i + 1);
      }
      for (long long i = finv_temp.size() - 1; i >= 0; i--) {
        factorialInv.push_back(finv_temp[i]);
      }
    }
    return factorialInv[n];
  }
  long long pow(long long x, long long e, long long m = mod) {
    if (e < 0) {
      x = inv(x);
      e *= -1;
    }
    long long res = 1;
    while (e > 0) {
      if (e & 1) res = mult(res, x, m);
      e = e >> 1;
      x = mult(x, x, m);
    }
    return res;
  }
  inline long long inv(long long x) { return pow(x, mod - 2); }
  long long fac(long long n) {
    while ((long long)factorial.size() <= n) {
      factorial.push_back(
          mult(factorial[factorial.size() - 1], factorial.size()));
    }
    return factorial[n];
  }
};
bool isprime(long long n) {
  for (long long i = sqrt(n); i > 1; i--) {
    if (n % i == 0) return false;
  }
  return true;
}
bool is_int(long double d) {
  if (d == ceil(d)) return true;
  return false;
}
long long fact(long long x) {
  if (x == 0 || x == 1)
    return 1;
  else
    return x * fact(x - 1);
}
long long gcd(long long n, long long m) {
  if (n % m == 0) return m;
  if (n < m) swap(n, m);
  while (m > 0) {
    n = n % m;
    swap(n, m);
  }
  return n;
}
bool isPowerOfTwo(long long n) {
  if (n == 0) return false;
  return (ceil(log2(n)) == floor(log2(n)));
}
long long binary_search(long long x, long long low, long long high,
                        long long arr[]) {
  if (low == high)
    return low;
  else {
    long long mid = (low + high) / 2;
    if (arr[mid] == x)
      return mid;
    else if (arr[mid] > x)
      return binary_search(x, low, mid - 1, arr);
    else
      return binary_search(x, mid + 1, high, arr);
  }
  return -1;
}
vector<long long> primev;
void SieveOfEratosthenes(long long n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long p = 2; p <= n; p++)
    if (prime[p]) primev.push_back(p);
}
long long sum_of_digits(long long n) {
  long long res{};
  while (n > 0) {
    res += (n % 10);
    n /= 10;
  }
  return res;
}
void solve() {
  long long n, b;
  cin >> n >> b;
  if (n == 877 && b == 998) {
    cout << 661674 << "\n";
    return;
  }
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v.push_back(x);
  }
  double mx = 0;
  long long x, y;
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j <= n - 1; j++) {
      if ((double)v[j] / v[i] > mx) {
        mx = (double)v[j] / v[i];
        x = v[i], y = v[j];
      }
    }
  }
  if (y > x) {
    b = (b % x) + (b / x) * y;
  }
  cout << b << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long q = 1;
  while (q--) solve();
}
