N = int(input())
price = list(map(int,input().split()))
start = 1000
for i in range(N-1):
    if price[i]<price[i+1]:
        for j in range(start//price[i]):
            start += price[i+1]-price[i]


print(max(1000,start))