N = int(input())
rate = input().split(" ")
for i in range(N):
  rate[i] = int(rate[i])

kabu = 0
money = 1000

for day in range(N):
  if kabu > 0:
    if rate[day-1] < rate[day]:
      money = money + kabu*rate[day]
      kabu = 0
    else:
      None
  else:
    if day == N-1:
      None
    elif rate[day] < rate[day+1]:
      kabu = money // rate[day]
      money = money - kabu*rate[day]
      
print(money)