n=int(input())
gold=1000
kabu=0
lst=list(map(int,input().split()))
for i in range(n-1):
    if lst[i]<lst[i+1]:
        kabu,gold=divmod(gold,lst[i])
    elif lst[i]>lst[i+1]:
        gold+=kabu*lst[i]
        kabu=0
gold+=kabu*lst[-1]
print(gold)