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

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