import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n = int(readline())
lst1 = list(map(int,readline().split()))
ct = 1000
stock = 0
#次の日に上がるか下がるか
lst2 = [0]*n
for i in range(n-1):
    if lst1[i] < lst1[i+1]:
        lst2[i] = 1
    elif lst1[i] > lst1[i+1]:
        lst2[i] = -1
for i in range(n):
    if lst2[i] == 1:
        stock = ct//lst1[i]
        ct %= lst1[i]
    elif lst2[i] == -1:
        ct += stock*lst1[i]


print(ct + stock*lst1[-1])
