N = int(input())
A = input().split()
A = [int(A[i]) for i in range(len(A))]
ans = 1000
kabu = 0
for i in range(N):
    if i == N-1:
        ans += kabu*A[i]
        kabu = 0
    else:
        if A[i] < A[i+1]:
            kabu = ans // A[i]
            ans += -A[i]*kabu
        elif A[i] > A[i+1]:
            ans += kabu*A[i]
            kabu = 0
print(ans)