# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int, input().split()))

money = 1000
stock = 0

i = 0
while i < N:
  A_min = A[i]
  A_max = A[i]
  A_min_index = i
  A_max_index = i
  for j in range(i, N):
    if A[j] < A_min:
      A_min = A[j]
      A_min_index = j
    if A[j] > A_max:
      A_max = A[j]
      A_max_index = j
      if A_min != 201:
        # 株購入
        stock = money // A[A_min_index]
        money = money % A[A_min_index]
        
        # 株売却
        money += stock * A[A_max_index]
        stock = 0
        i = A_max_index
        break
  i += 1
print(money)