a = int(input())
b = list(map(int,input().split()))

money = 1000
kabu = 0
for i in range(a):
    if i == a - 1:
        if b[i] > b[i-1]:
            money += b[i] * kabu
            kabu = 0            
    elif b[i] < b[i + 1]:
        kabu += int(money / b[i])
        money %= b[i]
    elif b[i] > b[i + 1]:
        money += b[i] * kabu
        kabu = 0
        
print(str(money))