N = int(input())
A = list(map(int,input().split()))
M = 1000
K = 0

for i in range(1, N):
  if A[i-1] < A[i]:
    K = M // A[i-1]
    M = M % A[i-1]
    if i == N-1:
      M += K * A[i]
  elif A[i-1] > A[i]:
    if K > 0:
      M += K * A[i-1]
      K = 0  
print(M)