import math
n = int(input())
A = list(map(int, input().split()))
money = 1000
kabu = 0


for i in range(n):
    # 今後上がらなければ何もしない
    if i != n-1 and max(A[i:n]) <= A[i]:
        # print('以降上がらないので修了')
        break
    # 最初は買う
    if i == 0:
        num = math.floor(money / A[i])
        # print(str(i)+'日目'+str(num)+'株買う')
        kabu += num
        money -= num * A[i]
        then_kabuka = A[i]
        continue
    # 買った値段より高ければ売る
    if A[i] > then_kabuka and kabu > 0:
        # print(str(i)+'日目'+str(kabu)+'株売る')
        money += A[i] * kabu
        kabu = 0
        #then_kabuka = 0
        continue
    # 今後値段が上がるなら買う
    if i+1 < n and A[i] < A[i+1]:
        num = math.floor(money / A[i])
        # print(str(i)+'日目'+str(num)+'株買う')
        kabu += num
        money -= num * A[i]
        then_kabuka = A[i]
        continue
    # 同じ値段なら何もしない
    if A[i] == then_kabuka:
        # print('何もしない')
        continue
print(money)