n=int(input())
ls=list(map(int,input().split()))
c=sorted(ls)
mini=c[0]
maxi=c[-1]
lb=0
k=1000
st=0
pmin=c.index(mini)
pmax=c.index(maxi)
for i in range(n):
  if i==pmin:
    st+=k//ls[i]
    k=k-ls[i]*(k//ls[i])
    lb=ls[i]
  elif i==pmax:
    k+=ls[i]*st
    st=0
  else:
    if i<n-1:
      if ls[i]>ls[i+1]:
        k+=ls[i]*st
        st=0
      elif ls[i]<ls[i+1]:
        st+=k//ls[i]
        k=k-ls[i]*(k//ls[i])
        lb=ls[i]
k+=lb*st
print(k)