n,*a=map(int,open(0).read().split())
ans=1000
num= 0
for i in range(n):
  if i == n-1:
    if a[i-1]<a[i]:
      ans += a[i]*num
  elif a[i]<a[i+1] and a[i+1]<ans:
    num = ans//a[i]
    ans = ans%a[i]
  elif a[i]<a[i+1] and a[i+1]>ans:
    continue
  elif a[i] == a[i+1]:
    continue
  else:
    ans += num*a[i]
  
print(ans)
