N = int(input())
A = list(map(int,input().split()))
cMoney = 1000
stock = 0

for i in range(N):
    if i == N - 1:
        if stock > 0:
            cMoney += A[i] * stock
            stock = 0
        continue

    if A[i] >= A[i+1]:
        if stock > 0:
            cMoney += A[i] * stock
            stock = 0
    else:
        stock = cMoney // A[i]
        cMoney -= stock * A[i]

print(cMoney)