n = int(input(''))
alist = list(map(int,input('').split()))
money=1000
stock=0

for d in range(n-1):
    if alist[d+1] > alist[d]:
        # 買い
        stock+=int(money/alist[d])
        money-=stock*alist[d]
#        print("[buy] {}*{} [{}]".format(stock,alist[d],money))
    else:
        # 売り
        money+=stock*alist[d]
        stock=0
#        print("[sell] {}*{} [{}]".format(stock,alist[d],money))

money+=stock*alist[n-1]
stock=0
#print("[sell] {}*{} [{}]".format(stock,alist[d],money))
print(money)