#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using vp = vector<P>;
using vt = vector<T>;
const int mod = 1000000007;
const double EPS = 1e-9;
const int INF = (1 << 30) - 1;
const ll LINF = (1LL << 62) - 1;
inline int in() {
  int x;
  cin >> x;
  return x;
}
inline ll lin() {
  ll x;
  cin >> x;
  return x;
}
inline char chin() {
  char x;
  cin >> x;
  return x;
}
inline string stin() {
  string x;
  cin >> x;
  return x;
}
inline double din() {
  double x;
  cin >> x;
  return x;
}
template <typename T>
inline ll suma(const vector<T>& a) {
  ll res(0);
  for (auto&& x : a) res += x;
  return res;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
char itoa(int n) { return n + '0'; }
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
const int dy[4] = {0, -1, 0, 1};
const int dx[4] = {1, 0, -1, 0};
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = (0); i < (n); ++i) cin >> a[i];
  int ans = 0;
  int s = 0;
  int tot = 1000;
  for (int i = (0); i < (n); ++i) {
    if (i < n - 1 && a[i] < a[i + 1] && tot / a[i] != 0) {
      s += tot / a[i];
      tot -= (tot / a[i]) * a[i];
    } else if (i && a[i] > a[i + 1] || i == n - 1) {
      s = 0;
      tot += s * a[i];
    }
    chmax(ans, tot);
  }
  cout << ans << endl;
  return 0;
}
