N = int(input())
A = [int(i) for i in input().split()]

cash=1000
stock=0
for i in range(N-1):
  if A[i] < A[i+1]:
    stock=cash//A[i]
    cash=cash%A[i]
  elif A[i] > A[i+1]:
    cash+=A[i]*stock
    stock=0

cash+=A[N-1]*stock
print(cash)