#-------------
N = int(input())
A = list(map(int, input().split()))
#-------------

kabu = 0
money = 1000
for i in range(N-1):
  if A[i] < A[i+1]:
    mod,money = divmod(money , A[i])
    kabu += mod
  if A[i] > A[i+1]
    money = money + A[i+1] * kabu
    kabu = 0

money = money + A[N-1]*kabu
print(money)