#include <iostream>
#include <vector>
#define ll long long
#define pb push_back
#define mp make_pair
using namespace std;
const ll MOD = 1000000007;
const ll INF = 1LL << 60;
ll main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll money = 1000;
    ll kabu = 0;
    ll n;
    cin >> n;
    vector<ll> a(n);
    for (ll i = 0; i < n; i++)
    {
        cin >> a[i];
        if (i > 0)
        {
            ll store = 0;
            if (a[i] > a[i - 1])
            {
                store = money / a[i - 1];
            }
            money += (a[i] - a[i - 1]) * store;
        }
    }
    cout << money << endl;
}