#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MAX = 18000;
const ll INF = 1e9;
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < n; i++) cin >> a[i];
  ll nax = 1000;
  ll ind = 0;
  ll mn = 1000;
  ll kb = 0;
  for (ll i = 0; i < n; i++) {
    if (a[i + 1] < a[i]) {
      mn += kb * a[i];
      kb = 0;
    } else {
      kb += (mn / a[i]);
      mn -= (mn / a[i]) * a[i];
    }
    nax = max(mn, nax);
  }
  cout << nax << endl;
}
