from sys import stdin
import sys
import itertools
import array
import textwrap
import math

N = int(input())
A = list(map(int, input().split()))
a = sorted(A, reverse=True)
if a == A:
    print('1000')
    sys.exit()
temp = A[0]
m = 1000
min = A[0]
temp0 = 0
for i in range(N):
    if i < temp0:
        continue
    for k in range(i, N):
        if temp > A[k]:
            min = A[k]
            # print(min)
        if temp < A[k]:
            m = A[k]*(m//min)+(m-(m//min)*min)
            min = A[k]
            temp = A[k]
            # print(m)
            temp0 = k
            break
    # print(i)
print(m)