import sys
N = int(input())
LIST_A = list(map(int,input().split()))

flag = True
money = 1000
i = 0
distance = 0
upstair = False
while flag == True:
  
  #print("i:",i,"distance:",distance)
  if LIST_A[distance+1] - LIST_A[distance] >= 0:
    #print(LIST_A[1+distance])
    #print(LIST_A[distance])
    if LIST_A[distance+1] - LIST_A[distance] > 0:
      upstair = True
    else:
      upstair = "updown"
    distance += 1
    
  else:
    #print("down")
    if upstair == True or upstair == "updown":
      money += (money//LIST_A[i])*(LIST_A[distance]-LIST_A[i])
      #print(money)
      upstair = False
    	
    i = distance+1
    distance += 1
    
  	
    
  if N <= distance+1:
    if upstair == True:
      #print("distance+1",distance+1)
      #print(money)
      money += (money//LIST_A[i])*(LIST_A[distance]-LIST_A[i])
    print(money)
    sys.exit()
    
  