#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
#define all(x) (x).begin(),(x).end()
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const int INF = 1000000000;

int main() {
    int N;
    cin >> N;
    vector<int>A(N);
    for (int i=0; i<N; i++)cin >> A[i];
    
    stocks = 0;
    money = 1000;
    int ans = 1000;
    bool bd = false;
    for (int i=0; i<N-1; i++){
        bd = false;
        if (A[i+1] > A[i]){
            stocks += money / A[i];
            money -= money / A[i] *A[i];
            bd = true;
        }
    
    
        if (!bd){
            money += A[i]*stocks;
            stocks = 0;
        }
    
        //chmax(ans, money);
    }
    money += stocks*A[N-1];
    //chmax(ans,money);

    //最終日に下がる場合を考える必要がありそう
    cout << money << endl;
}
