if __name__ == "__main__":
    N = int(input())
    A = list(map(int, input().split()))
    kai = A[0]
    uri = A[0]
    flag=0
    temoti = 1000
    for i in range(1,N-1):
        if kai < A[i] and uri<A[i]:
            uri=A[i]
            flag=1
        elif kai > A[i]:
            kai = A[i]
            flag=0
            uri = A[i]
        if flag==1:
            if uri>A[i]:
                temoti = temoti + temoti // kai *(uri-kai)
                kai = A[i]
                uri = A[i]
                flag=0
    
    if uri< A[N-1]:
        uri = A[N-1]
    if kai<uri:
        temoti = temoti + temoti // kai * (uri-kai)

    print(temoti)
                
