N = int(input())
A = list(map(int, input().split()))
money = 1000
stock = 0
tmp = [0]*(N-1)

for i in range(N-1):
    if A[i] == A[i+1]:
        tmp[i] = 0
    else:
        if A[i] < A[i+1]:
            tmp[i] = 1
        else:
            tmp[i] = -1

for i in range(N-1):
    if tmp[i] == 1:
        stock += money//A[i]
        money -= A[i]*stock
    if tmp[i] == -1:
        money += A[i]*stock
        stock = 0
    if tmp[i] == 0:
        continue
    # print('day',i+1,':',money,stock)


print(money + stock*A[N-1])
