import numpy as np
n=int(input())
a = list(map(int, input().split()))
m = 1000
kabu = 0
for i in range(n-1):
  if a[i] < a[ i +1 ]:
    kabu = int((m - (m % a[i])) / a[i])
    m = m % a[i]
  elif a[i] > a[ i +1 ]:
    m = m + (a[i] * kabu)
    kabu = 0
if kabu > 0:
  m = m + kabu * a[-1]
print(m)