n=int(input())
a=list(map(int,input().split()))
money=1000
num=0
for i in range(n-1):
    if a[i]==a[i+1]:
        money=money
    elif a[i]<a[i+1]:
        num+=money//a[i]
        money-=num*a[i] 
    elif a[i]>a[i+1]:
        money+=a[i]*num
        num=0
if a[-1]>a[-2]:
    money+=a[-1]*num
elif a[-1]<=a[-2]:
    money=money
print(money)