N = int(input())
A_list = list(map(int, input().split()))
mymoney = 1000
myValue = A_list[0]
nextpos = 1
myflag = 0  #0: buy,  1: sell
while nextpos < N:
    if myflag == 0:
        if A_list[nextpos] > myValue:
            kabu_num = mymoney // myValue
            mymoney -= kabu_num * myValue
            mymoney += kabu_num * A_list[nextpos]
            myflag = 1
            myValue = A_list[nextpos] 
    if myflag == 1:
        if A_list[nextpos] < myValue:
            myValue = A_list[nextpos]
            myflag = 0
    nextpos += 1
    #print(nextpos, mymoney, myValue)
print(mymoney)