n=int(input())
a = list(map(int,input().split()))
saifu = 1000
kaine = None
urine = None
for i in range(n):
  if kaine == None:
    kaine = a[i]
    continue
  if urine == None:
    if i < n - 1 and kaine < a[i]:
      urine = a[i]
      continue
  if i < n - 1 and urine != None and urine <= a[i]:
    urine = a[i]
    continue
  if i == n - 1 and kaine < a[i]:
    urine = a[i]
  if kaine != None and urine != None:
    kabu = int(saifu / kaine)
    saifu += kabu * (urine - kaine)
    kaine = a[i]
    urine = None
print(saifu)
      