N = int(input())
L = list(map(int, input().split()))

money = 1000
stocks = 0

for i in range (0, N-1):
    if L[i+1] > L[i]:
        stocks = money//L[i]
        money = money%L[i]
    elif L[i+1] == L[i]:
        continue
    else:
        money+= stocks*L[i]
        stocks = 0

print(money+stocks*L[-1])