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

import math
ans = 1000
base = 100
l = -1
r = -1
for i in range(N-1):
    if l == -1:
        l = i
    elif r == -1:
        if A[i] < A[l]:
            l = i
        else:
            r = i
            if A[i] >= A[i+1]:
                ans = math.floor((ans / A[l])) * A[r] + ans % A[l]
                l = -1
                r = -1
    else:
        if A[i] > A[r]:
            r = i
        else:
            ans = math.floor((ans / A[l])) * A[r] + ans % A[l]
            l = -1
            r = -1
if l != -1 and A[N-1] > A[l]:
    r = N-1
    ans = math.floor((ans / A[l])) * A[r] + ans % A[l]

print(ans)
