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

    except:
        if i==0:
            if a[i]<=a[i+1]:
                stock+=money//a[i]
                money%=a[i]
        else:
            money+=a[i]*stock
            stock=0
print(money)