#D - Road to Millionaire
N= int(input())
A= list(map(int,input().split()))
A_s = [0]
B = 1000
C = 0
B_1 = 0
C_1 = 0
for j in range(N-1):
    A_s.append(A[j+1]-A[j])
#print(A_s)

for i in range(N-1):
    if A_s[i+1] > 0:
        B_1 = B - (B // A[i])*A[i]
        C_1 = C + B // A[i]
        B = B_1
        C = C_1
    elif A_s[i+1] <= 0:
        if C > 0:
            B_1 = B + C * A[i + 1]
            C = 0
            B = B_1
    else:
        pass
if C > 0:
    B = B +C*A[N-1]

print(B)