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;
long long int cill(long long int a, long long int b) {
  if (a % b == 0) return a / b;
  return a / b + 1;
}
long long int maxx(long long int a, long long int b) { return a > b ? a : b; }
long long int minn(long long int a, long long int b) { return a < b ? a : b; }
vector<long long int> take_input(long long int n) {
  vector<long long int> v;
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    v.push_back(x);
  }
  return v;
}
vector<int> take_input(int n) {
  vector<int> v;
  for (long long int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  return v;
}
void print(vector<long long int> v) {
  for (long long int i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << endl;
}
vector<long long int> num_to_vect(long long int n) {
  vector<long long int> v, temp;
  v.push_back(0);
  while (n) {
    temp.push_back(n % 10);
    n /= 10;
  }
  reverse(temp.begin(), temp.end());
  for (long long int i = 0; i < temp.size(); i++) v.push_back(temp[i]);
  return v;
}
long long int odd_n(long long int n) { return (n - 1) / 2 + 1; }
int gcd(int a, int b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
long long int get_min(vector<long long int> v) {
  long long int mn = 100000.0;
  for (long long int i = 0; i < v.size(); i++) mn = minn(mn, v[i]);
  return mn;
}
void printt(vector<int> v) {
  for (long long int i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << endl;
}
int bin_to_dec(string bin) {
  int sum = 0;
  for (int i = 0; i < bin.size(); i++) {
    sum *= 10;
    sum += (bin[i] - '0');
  }
  return sum;
}
double find_dis(pair<double, double> p1, pair<double, double> p2) {
  return sqrt((p1.first - p2.first) * (p1.first - p2.first) +
              (p1.second - p2.second) * (p1.second - p2.second));
}
map<string, int> mp;
map<int, string> mp1;
bool mat[20][20];
vector<vector<int> > ans;
vector<int> temp;
void process(int mask, int n) {
  vector<int> digits;
  for (int i = 0; i < n; i++) {
    digits.push_back(mask % 2);
    mask /= 2;
  }
  bool flag = true;
  for (int i = 0; i < digits.size(); i++)
    for (int j = 0; j < digits.size(); j++)
      if (i != j && (digits[i] == 1 && digits[j] == 1) && mat[i][j] == true) {
        flag = false;
        break;
      }
  if (flag) {
    temp.clear();
    for (int i = 0; i < digits.size(); i++)
      if (digits[i] == 1) temp.push_back(i);
    ans.push_back(temp);
  }
}
void solve() {
  int n, b;
  cin >> n >> b;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  int ans = b;
  for (int i = 0; i < n; i++) {
    int num_of_dollars = (b / v[i]);
    int mx = 0;
    for (int j = i; j < n; j++) mx = max(mx, v[j]);
    ans = max(ans, (b - num_of_dollars * v[i]) + (mx * num_of_dollars));
  }
  cout << ans << endl;
}
int main() { solve(); }
