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.
import sys
from os import path
from math import gcd,floor,sqrt,log,ceil
from bisect import bisect_left, bisect_right
import heapq

############ ---- Input Functions ---- ####################
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
def inmatrix(n,m):
    arr=[]
    for i in range(n):
        temp=inlt()
        arr.append(temp)
    return arr
############################################################
def cuberoot(x):
    if 0<=x: return x**(1./2.)
    return -(-x)**(1./2.)
def is_anagram(str1, str2):
    return sorted(str1) == sorted(str2)
############################################################
mod=1000000007
############################################################
if(path.exists('input.txt')):
    sys.stdin = open("input.txt","r")
    sys.stdout = open("output.txt","w")
    sys.stderr = open("error.txt", "w")
else:
    input = sys.stdin.readline
############################################################
def solve():
    n,b=invr()
    a=inlt()
    flag=True
    arr=[[0,0,0] for i in range(n+1)]
    for i in range(n-1):
        m=0
        for j in range(i+1,n):
            if m<=a[j]-a[i]:
                arr[i]=[i,j,a[j]-a[i]]
                m=a[j]-a[i]
                flag=False
    if flag:
        print(b)
        return
    arr.sort(key=lambda x:-x[2])
    ans=0
    carry=0 
    for i in range(len(arr)):
        if b%a[arr[i][0]]==0:
            temp=b//a[arr[i][0]]
            ans+=temp*a[arr[i][1]]
            print(ans)
            return
        else:
            temp=floor(b/a[arr[i][0]])
            ans+=temp*a[arr[i][1]]
            b=b%a[arr[i][0]]
    print(ans+b)

def main():
    # T=inp()
    T=1
    for i in range(T):
        solve()

main()  