N = int(input())

A = list(map(int, input().split()))

cnt = 0

M = 1000

min_ind = 0

def kau(M, a, cnt):
    result_cnt = M // a
    result_kingaku = M - (result_cnt * a)
    return result_kingaku, result_cnt
    
def uru(M, a, cnt):
    result_cnt = 0
    result_kingaku = M + a * cnt
    return result_kingaku, result_cnt

for i in range(N - 1):
    if A[i + 1] > A[i]:
        # 買う
        M, cnt = kau(M, A[i], cnt)
    elif A[i + 1] == A[i]:
        # 何もしない
        pass
    else:
        # 売る
        M, cnt = uru(M, A[i], cnt)

if cnt:
    M, cnt = uru(M, A[-1], cnt)
print(M)