n = int(input())
A = list(map(int, input().split()))
ans = 1000
sto = 0
for i in range(1,n):
    if A[i]>A[i-1]:
        sto += ans//A[i-1]
        ans %= A[i-1]
    else:
        ans += sto*A[i]
        sto = 0
print(ans+sto*A[-1])