#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long INF = 1e7;
double EPS = 1e-12;
const long long lim = 2e5 + 100;
template <typename T1>
void printIt(T1 t1) {
  cout << t1 << " )" << endl;
}
template <typename T1, typename... T2>
void printIt(T1 t1, T2... t2) {
  cout << t1 << " , ";
  printIt(t2...);
}
long long powP(long long x, long long y) {
  long long ans = 1, po = x % mod;
  while (y > 0) {
    if (y & 1) ans = ans * po % mod;
    y >>= 1;
    po = po * po % mod;
  }
  return ans;
}
vector<pair<long long, long long> > V;
long long Array[lim], C[lim];
vector<pair<long long, long long> > Allstocks;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int T, i, p, j, l, e, r, b, c, k, m, q, a, d, w, x, y, u, v, z, t,
      curr, prev, sum = 0, val, countA = 0, indicator = 0, pos, h, minA, maxA,
                  type, n, ans = 0, left, right;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> Array[i];
  Array[0] = mod;
  Array[n + 1] = 0;
  for (int i = 1; i <= n + 1; i++) {
    if (Array[i] < Array[i - 1]) {
      V.push_back(make_pair(Array[prev], Array[i - 1]));
      prev = i;
    }
  }
  val = 1000;
  for (auto i : V) {
    val = (val / i.first) * i.second + val - (val / i.first) * i.first;
  }
  cout << val << endl;
  return 0;
}
