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

delta_a = [0] * (n-1)
for i in range(n-1):
  delta_a[i] = a[i+1] - a[i]

stock = 0
money = 1000
for i in range(n-1):
  if delta_a[i] > 0:
    stock = money // a[i]
    money = money % a[i]
  elif delta_a[i] < 0:
    money += stock * a[i]
    stock = 0

if stock != 0:
  money += stock * a[n-1]
print(money)