n=int(input())
a=list(map(int,input().split()))
m=1000
ze=201
cou=0
for i in range(n):
  if a[i]<ze:
    cou+=m//a[i]
    m=m%a[i]
    ze=a[i]
    
  elif a[i]>ze:
    m+=a[i]*cou
    cou=0
    ze=a[i]
  else:
    continue
print(m)    