N = int(input())
#S = str(input())
#N, K= map(int, input().split())
A = list(map(int, input().split()))

money = 1000
book = 0
for i in range(1, N):
  if A[i] > A[i - 1]:
    book += int(money / A[i - 1])
    money -= book * A[i - 1]
  elif A[i] < A[i - 1]:
    money += book * A[i - 1]
    book = 0
  #print(money, book)  

money += book * A[-1]  
print(money)    
    
    
    
  
  
  


