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

vector<int> a;
int n;

int main() {
    cin >> n;
    a = vector<int>(n);
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }

    int ans = 1000;
    for (int i = 1; i < n; ++i) {
        if (a[i-1] < a[i]) {
            const auto pre = ans;
            ans %= a[i-1];
            ans += pre / a[i-1] * a[i];
        }
    }

    cout << ans << endl;

    return 0;
}
