n=int(input())
a=list(map(int,input().split()))
money=1000
num=0
if max(a)==a[0] or min(a)==a[-1]:
    print(1000)
else:
    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-=(money//a[i])*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)
