N = int(input())
a_list = list(map(int, input().split()))

money = 1000
stock = 0

for i in range(N):
    if i == N-1:
        money += stock * a_list[i]
        break
    if a_list[i] < a_list[i+1]:
        stock = money // a_list[i]
        money = money % a_list[i]
    elif a_list[i] > a_list[i+1]:
        money += stock * a_list[i]
        stock = 0
    else:
        continue
print(money)