N = int(input())
A = list(map(int, input().split()))
M = 1000
stock = 0
for i in range(1, N):
  # print(M)
  if A[i-1] < A[i]:
    stock = M // A[i-1]
    M -= stock * A[i-1]
  elif A[i-1] > A[i]:
    M += stock * A[i-1]
    stock = 0
if stock:
  M += stock * A[-1]
print(M)