n = int(input())
a = list(map(int, input().split()))

ans = 1000
maxv = a[0]
minv = a[0]
for i in range(n):
    if i < n - 1:
        if a[i] < maxv:
            ans += (maxv - minv) * (ans // minv)
            maxv = a[i]
            minv = a[i]
        else:
            maxv = max(maxv, a[i])
            minv = min(minv, a[i])
    else:
        if a[i] > minv:
            ans += (a[i] - minv) * (ans // minv)

print(ans)
