n = int(input())
a = [0]+[int(x) for x in input().split()]
kabuka=[a[1]]
taka=True

for i in range(1,n+1):
    if taka:
        if kabuka[-1]<a[i]:
            kabuka.append(a[i])
            taka=False
    else:
        if kabuka[-1]>a[i]:
            kabuka.append(a[i])
            taka=True

money=1000
if len(kabuka)==1:
    print(money)
    exit()

for i in range(len(kabuka)):
    if i%2==0:
        if i==len(kabuka):
            break
        kabukosuu=money//kabuka[i]
        money%=kabuka[i]
    else:
        money+=kabukosuu*kabuka[i]

print(money)