n = int(input())
a = list(map(int, input().split()))

stock = 0
money = 1000

for i in range(n-1):
    if a[i] < a[i+1]:
        stock = money // a[i]
        money -= stock * a[i]
    elif a[i] > a[i+1]:
        money += stock * a[i]
        stock = 0

money += stock * a[n-1]

print(money)