#include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    cin >> N;
    int A[N+1];

    for (int i=1; i<=N; i++) {
        cin >> A[i];
    }

    unsigned long int currentMoney=1000,kabu=0;
    for (int i = 1 ; i<N ; i++) {
        if ( A[i] < A[i + 1] ) {
            kabu += currentMoney / A[i];
            currentMoney = currentMoney % A[i];
        } else if ( A[i] > A[i+1] ) {
            currentMoney += kabu * A[i];
            kabu = 0;
        }

        // cout << "currentMoney" << currentMoney << endl;
        // cout << "kabu" << kabu << endl;
    }

    if (kabu != 0){
        currentMoney += kabu * A[N];
    }

    cout << currentMoney << endl;


    return 0;
}
