N = int(input()) #1行目のNを取得する
Input = list(map(int, input().split()))

Stock = 0
Money = 1000
  
for i in range(N):
  j = i + 1
  
  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)