#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll n = 0;
  cin >> n;
  vector<ll> nedan(n);
  vector<ll> money(n);
  money[0] = 1000;
  for (ll i = 0; i < n; i++) {
    cin >> nedan[i];
  }
  for (ll i = 1; i < n; i++) {
    ll MIN = 1001;
    ll tmpNedan = 0;
    for (ll j = 0; j < i; j++) {
      if (MIN > nedan[j]) {
        MIN = nedan[j];
        tmpNedan = j;
      }
    }
    money[i] = max((money[tmpNedan] / MIN) * nedan[i], money[i - 1]);
  }
  cout << money[n - 1] << endl;
  return 0;
}
