#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> v(n), deltas;
  for (int i = 0; i < n; ++i) cin >> v[i];
  int cash = 1000, stocks;
  int mi = v[0], ma = v[0];
  for (int i = 1; i < n; ++i) {
    if (v[i] > ma)
      ma = v[i];
    else if (v[i] < ma) {
      stocks = (int)floor((double)cash / (double)mi);
      cash = cash % mi;
      cash += (int)floor((double)stocks * (double)ma);
      ma = v[i];
      mi = v[i];
    } else if (v[i] < mi) {
      mi = v[i];
    }
  }
  if (ma > mi) {
    stocks = (int)floor((double)cash / (double)mi);
    cash = cash % mi;
    cash += (int)floor((double)stocks * (double)ma);
  }
  cout << cash << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
