N = int(input())
A = list(map(int, input().split()))
kabu = 0
money = 1000
for i in range(N):
  money += kabu*A[i]
  kabu = 0
  if i!=N-1:
    if A[i]<A[i+1]:
      kabu += money//A[i]
      money %= 0
    else:
      continue
print(money)