import sys
input = sys.stdin.readline
import numpy as np

n = int(input())

AA = [int(a) for a in input().split()]
c = 0
updwn=[None]*(n-1)
for a in AA:
    if c ==0:
        c +=1
        base = a
        continue
    if a - base >= 0:
        updwn[c-1] = True
        base = a
    else:
        updwn[c-1] = False
        base = a
    c += 1
updwn+=[False, False]
base = False
total = 1000
stock = 0
if n ==2:
    if updwn[0]==True:
        total += (total//AA[0])*(AA[1]-AA[0])
else:
    for i in range(n):
        if updwn[i] == True and base == False:
            tdcost= AA[i]
            stock = total // tdcost
            base_cost = tdcost
        elif updwn[i] == True and updwn[i+1]==False:
            tdcost=AA[i+1]
            total += (tdcost - base_cost)*stock
            stock = 0
            base = updwn[i]
        else:
            pass
print(total)
