#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using P = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
void solve() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  vector<P> p;
  int dir;
  if (a[0] <= a[1]) {
    p.push_back(P(-1, 0));
    dir = 1;
  } else {
    dir = -1;
  }
  for (int i = 1; i < n - 1; i++) {
    if (dir == 1 && a[i] > a[i + 1]) {
      p.push_back(P(dir, i));
      dir = -1;
    } else if (dir == -1 && a[i] < a[i + 1]) {
      p.push_back(P(dir, i));
      dir = 1;
    }
  };
  ll ans = 1000;
  {
    ll cash = 1000;
    int qty = 0;
    for (int i = 0; i < (p.size()); i++) {
      if (p[i].first == 1) {
        cash += a[p[i].second] * qty;
        qty = 0;
      }
      if (p[i].first == -1) {
        qty = cash / a[p[i].second];
        cash -= a[p[i].second] * qty;
      };
    }
    if (qty) {
      cash += a[n - 1] * qty;
    };
    (ans = max(ans, cash));
  }
  cout << ans << endl;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  solve();
  return 0;
}
