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

money =1000
stock = 0

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