n = int(input())
a = list(map(int, input().split()))

s = 1000
c = 0
for i in range(n-1):
  if a[i+1] > a[i]:
    c = s//a[i]
    s -= c*a[i]
  elif a[i+1] == a[i]:
    continue
  else:
    s += c*a[i]
  # print (s)
if c == 0:
  print (max(s,1000))
else:
  s += c*a[-1]
  print(s)