N = int(input())
A = list(map(int,input().split()))

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