N = int(input()) 
A = list(map(int, input().split())) 

M = 1000
X = 0

for i in range(N-1):
    if A[i] < A[i+1]:
        X = int(M/A[i])
        M = int(M - X * A[i])
    
    elif A[i] > A[i+1]:
        M = int(M + A[i] * X)
        X = 0
    
M = M + X * A[N-1]

print(int(M))