n = int(input())
a = list(map(int,input().split()))
mon = 1000
kab = 0

for i in range(1,n+1):
    if i == n:
        if kab != 0:
            mon += kab * a[n-1]
            kab = 0
    else:
        if a[i-1] < a[i]:
            kab = int(mon/a[i-1])
            mon = mon%a[i-1]
        else:
            mon += kab * a[i-1]
            kab = 0
print(mon)
