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

kai=[]
uri=[]
sokone=A[0]
takane=A[0]
for i in range(1,N):
    if A[i-1]<=A[i]:
        takane=A[i]
        if i==(N-1) and takane>sokone:
            uri.append(takane)
            kai.append(sokone)
    else:
        if sokone<A[i]:
            uri.append(takane)
            kai.append(sokone)
            sokone=A[i]

kabu=0
money=1000
for i in range(len(kai)):
    #kabu+=money//kai[i]
    money=money%kai[i]+uri[i]*(money//kai[i])
  

print(money)