
#!/usr/bin/python
# -*- coding: utf-8 -*-

import numpy as np

def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(input()))
    return np.array(x)

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

money = 1000
stock = 0

for i in range(0,N-1):
    check = 0
    for j in range(i,N-1):
        if A[j] > A[j+1]:
            check += 1
    if check == N-1-i:
        money = money + A[i]*stock
        print(money)
        exit()
    
    if A[i] < A[i+1]:
        stock = money//A[i]
        money = money - stock*A[i]
    else:
        money = money + stock*A[i]
        stock = 0

if stock > 0:
    money = money + stock*A[N-1]
print(money)


