N = int(input()) #1行目のNを取得する
Input = [int(input()) for i in range(N)] #複数行の数値の入力を取得
 
for i in range(N):
  j = i + 1
  
  Stock = 0
  Money = 1000
  
  if j = 1:
    if Input[i] < Input[i+1]:
      Stock = Money // Input[i]
      Money = Money % Input[i]
     
    continue
   
  if j = N:
    if Stock != 0:
      money = money + Stock * Input[i]
    continue
  
  if Input[i - 1] < Input[i]:
    money = money + Stock * Input[i]
  
  if Input[i + 1] > Input[i]:
    Stock = Money // Input[i]
    Money = Money % Input[i]

    
print(money)