#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
inline void cpuTime() {
  cerr << "cpu time : " << double(clock()) / CLOCKS_PER_SEC << "\n";
  return;
}
using ll = long long;
using ull = unsigned long long;
using F = float;
using D = double;
using vi = vector<int>;
using pii = pair<int, int>;
void solve() {
  int n = 0;
  cin >> n;
  vi a(n);
  for (decltype(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n)))
    cin >> a[i];
  int r = 1000, s = 0;
  for (decltype(n - 1) i = (0) - ((0) > (n - 1));
       i != (n - 1) - ((0) > (n - 1)); i += 1 - 2 * ((0) > (n - 1))) {
    if (a[i] < a[i + 1]) {
      s = r / a[i];
      r -= s * a[i];
    } else if (a[i] > a[i + 1]) {
      r += (s * a[i]);
      s = 0;
    }
  }
  r += s * a[n - 1];
  cout << r << "\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
  while (t--) {
    solve();
  }
  cpuTime();
  return 0;
}
