n = int(input())
li = list(map(int,input().split()))
money = 1000
stock = 0
for i in range(n-1):
  if stock > 0:
    money += stock * li[i]
  
  if li[i] < li[i+1]:
    stock = money // li[i]
    money -= stock * li[i]

if stock > 0:
  money += stock * li[n-1]
  
print(money)