import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
A = LI()
okane = 1000
stock = 0
for i in range(N-1):
    if A[i] < A[i+1]:
        #kau
        stock = okane//A[i]
        okane = okane%A[i]
    elif A[i] > A[i+1]:
        #uru
        okane += stock*A[i]
        stock = 0
    else:
        continue
print(okane+stock*A[-1])
