n=int(input())
a=list(map(int,input().split()))
cnt=1000
kab=0
for i in range(n-1):
  if a[i]<a[i+1]:
    kab+=cnt//a[i]
    cnt-=kab*a[i]
  else:
    cnt+=kab*a[i]
    kab=0
if kab>0:
  cnt+=kab*a[n-1]
 
print(cnt)    