N = int(input())
A = [int(x) for x in input().split()]
value = 1000
current = 0
stocks = 0
if A[0] == max(A):
    print(1000)
else:
    for i in range(N-1):
        if A[i] < A[i+1] and current == 0:
            stocks = value//A[i]
            value = value - stocks*A[i]
            current = 1
        if A[i]==max(A[i:]) and current ==1:
            value = value + stocks*A[i]
            stocks = 0
            current = 0
        elif A[i] > A[i+1] and current == 1:
            value = value + stocks*A[i]
            stocks = 0
            current = 0
    if current==1:
        value = value + stocks*A[N-1]
    print(value)
        