#include <bits/stdc++.h>
using namespace std;
void my_dbg() { cout << endl; }
template <typename Arg, typename... Args>
void my_dbg(Arg A, Args... B) {
  cout << ' ' << A;
  my_dbg(B...);
}
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
const int inf = INT_MAX;
const int ninf = INT_MIN;
const int mod = 1e9 + 7;
const int maxN = 2e5 + 2;
void solve() {
  int n;
  scanf("%d", &n);
  vi a(n);
  for (int i = (int)(0); i < (int)(n); i++) scanf("%d", &a[i]);
  vi suf_max(n, ninf), suf_min(n, inf);
  suf_min[n - 1] = suf_max[n - 1] = a[n - 1];
  int stocks = 0, have = 1000;
  for (int i = (int)(0); i < (int)(n - 1); i++) {
    if (a[i + 1] > a[i]) {
      stocks += have / a[i];
      have %= a[i];
    }
    if (a[i + 1] < a[i]) {
      have += stocks * a[i];
      stocks = 0;
    }
  }
  have += stocks * a[n - 1];
  printf("%d\n", (int)(have));
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
