import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N = I()
A = LI()
money,stock = 1000,0
temp = A[0]
for i in range(1,N):
    if temp<A[i]:
        stock = money//A[i-1]
        money -= A[i-1]*stock
    if temp>A[i]:
        if stock:
            money += A[i-1]*stock
            stock = 0
    temp = A[i]
    if i==N-1:
        if stock:
            money += A[i]*stock
print(money)
