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 *a*<sub class="lower-index">*i*</sub>. 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*?
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 *a*<sub class="lower-index">*i*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 2000) — the prices of Martian dollars.
#بسم الله الرحمن الرحيم
n, b = [int(i) for i in input().split()]
dolars_price =[int(i) for i in input().split()]
i=j=0
fin =[0]
for i  in range(len(dolars_price)-1):
    for j in range(i,len(dolars_price)-1):
        if dolars_price[j]>dolars_price[i] and b>=dolars_price[i]:
            z=b%dolars_price[i]
            cost= ((b-z)/dolars_price[i]) * (dolars_price[j]-dolars_price[i])
            fin.append(cost)


print(int(max(fin)+b))