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

a.append(90)
money=1000
kabu=0
for i in range(n):
  if a[i+1] > a[i]:
    kabu=int(money/a[i])
    money-=a[i]*kabu
  elif a[i+1] < a[i]:
    money+=kabu*a[i]
    kabu=0
print(money)
