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

def ask_judge(asset_now, position):
    if ask[i]:
        position += asset_now // A[i]
        asset_now -= position * A[i]    
    return asset_now, position

def bid_judge(asset_now, position):
    if bid[i]:
        asset_now += position * A[i]    
        position = 0
    return asset_now, position


asset_now = 1000

ask = [True if A[i+1] - A[i] > 0 else False for i in range(N-1)]
bid = [True if A[i+1] - A[i] <= 0 else False for i in range(N-1)]
position = 0

for i in range(N):
    if i == 0:
        asset_now, position = ask_judge(asset_now, position)
    elif i == N-1:
        if position > 0:
            asset_now += position * A[N-1]
    else:
        asset_now, position = ask_judge(asset_now, position)
        asset_now, position = bid_judge(asset_now, position)

print(asset_now)