#!/usr/bin/env python

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

m = max(a)
ans = 1000
stock = 0 
for i in range(n):
    if a[i] == m:  
        ans += stock*a[i]
        stock = 0 
        break

    if i == 0: # buy
        stock += ans//a[i]
        ans -= ans//a[i] * a[i]
    
    else:
        # 安くなっているとき、買える分は買う
        if a[i] < a[i-1]:
            stock += ans//a[i]
            ans -= ans//a[i] * a[i]
        # 高くなっているとき、売れる分は売る
        elif a[i] > a[i-1]:
            ans += stock*a[i]
            stock = 0 

    # print('ans =', ans)
    # print('stock =', stock)

print(ans)
