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

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