# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
A = list(map(int,readline().split()))
money = 1000
num = 0 
pre_price = 0
for i in range(N):
    low_flag = False
    high_flag = False
    money += A[i]*num
    num = 0
    for j in range(i+1,N):
        if A[i] < A[j]:
            high_flag = True
        if A[i] > A[j]:
            low_flag = True
    if high_flag and low_flag == False:
        tmp_num = money // A[i]
        price = tmp_num * A[i]
        money -= price
        num += tmp_num
        pre_price = A[i]
print(money)