N = int(input())
A = list(map(int,input().split()))
mon = 1000
kabu = 0
diff = 0
maa = 0
minn = 0
out = 0
tmp = 0
if A[-1] == 100:
  print("1000")
else:
  mins = A[0]
  maxs = 0
  for i in range(N-1): 
    a = A[i+1:]
    amax = max(a)
    tmp = amax-A[i]
    if diff <= tmp :
      maxin = A.index(amax)
      minin = i
      maa = amax
      minn = A[i]
  kabu = mon / maa
  mon = mon % maa
  mon += maa * kabu 
  print(int(mon))

