n = int(input())
list_A = list(map(int, input().split()))
list_N = [0]
money = 1000
for i in range(1, n):
    if list_A[i-1] < list_A[i]:
        list_N.append(1)
    else:
        list_N.append(0)


for k in range(1, n):
    if list_N[k-1] == 0 and list_N[k] == 1:
        roll = money // list_A[k-1]
        money = money % list_A[k-1]
        money += list_A[k]*roll


print(money)