#include <bits/stdc++.h>
using namespace std;
constexpr long double PI = 3.141592653589793238;
constexpr long long INF = (long long)1e15;
constexpr long long MOD = 998244353;
using LL = long long;
using st = string;
template <typename T>
using vec = vector<T>;
template <typename T>
using vvec = vec<vec<T>>;
template <typename T>
using vvvec = vec<vvec<T>>;
using vi = vector<long long>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vd = vector<double>;
using vvd = vector<vd>;
using vvvd = vector<vvd>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<st>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
using pi = pair<long long, long long>;
using ppi = pair<pi, long long>;
using vpi = vector<pi>;
using vppi = vector<ppi>;
using mii = map<long long, long long>;
using mpii = map<pi, long long>;
using mib = map<long long, bool>;
using mci = map<char, long long>;
template <typename T>
using pq_greater = priority_queue<T>;
template <typename T>
using pq_smaller = priority_queue<T, vec<T>, greater<T>>;
long long dx[] = {-1, 0, 0, 1, -1, -1, 1, 1, 0};
long long dy[] = {0, 1, -1, 0, 1, -1, 1, -1, 0};
template <typename T>
istream &operator>>(istream &in, vector<T> &v) {
  for (LL i = 0; i < (v.size()); i++) {
    in >> v[i];
  }
  return in;
}
template <typename T, typename U>
istream &operator>>(istream &in, pair<T, U> &p) {
  in >> p.first >> p.second;
  return in;
}
template <typename T>
ostream &operator<<(ostream &out, vector<T> &v) {
  out << "{";
  for (LL i = 0; i < (v.size()); i++) {
    out << v[i] << ",";
  }
  out << "}"
      << "\n";
  return out;
}
template <typename T, typename U>
ostream &operator<<(ostream &out, pair<T, U> &p) {
  out << "{" << p.first << "," << p.second << "}"
      << "\n";
  return out;
}
struct mint {
  long long x;
  mint(long long x = 0) : x((x % MOD + MOD) % MOD) {}
  mint operator-() const { return mint(-x); }
  mint &operator+=(const mint a) {
    if ((x += a.x) >= MOD) x -= MOD;
    return *this;
  }
  mint &operator-=(const mint a) {
    if ((x += MOD - a.x) >= MOD) x -= MOD;
    return *this;
  }
  mint &operator*=(const mint a) {
    (x *= a.x) %= MOD;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res -= a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res *= a;
  }
  mint pow(long long t) const {
    if (!t) return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1) a *= *this;
    return a;
  }
  mint inv() const { return pow(MOD - 2); }
  mint &operator/=(const mint a) { return (*this) *= a.inv(); }
  mint operator/(const mint a) const {
    mint res(*this);
    return res /= a;
  }
  friend ostream &operator<<(ostream &out, const mint &m) {
    out << m.x;
    return out;
  }
};
void y_n(bool p) {
  p ? cout << "Yes"
           << "\n"
    : cout << "No"
           << "\n";
}
void Y_N(bool p) {
  p ? cout << "YES"
           << "\n"
    : cout << "NO"
           << "\n";
}
template <typename T>
pair<pair<T, long long>, pair<T, long long>> vmaxmin(vector<T> v) {
  long long MAX = -INF;
  long long MIN = INF;
  long long maxpos = 0;
  long long minpos = 0;
  for (LL i = 0; i < (v.size()); i++) {
    if (MAX < v[i]) {
      maxpos = i;
      MAX = v[i];
    }
    if (MIN > v[i]) {
      minpos = i;
      MIN = v[i];
    }
  }
  return {{MAX, maxpos}, {MIN, minpos}};
}
template <typename T>
T vsum(vector<T> v) {
  T sum = 0;
  for (LL i = 0; i < (v.size()); i++) {
    sum += v[i];
  }
  return sum;
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    swap(a, b);
  }
  long long r;
  while ((r = a % b) != 0) {
    a = b;
    b = r;
  }
  return b;
}
long long lcm(long long a, long long b) { return (a / gcd(a, b) * b); }
bool is_square(long long n) {
  if ((long long)sqrt(n) * (long long)sqrt(n) == n) {
    return true;
  } else {
    return false;
  }
}
bool is_prime(long long n) {
  if (n <= 1) {
    return false;
  } else {
    for (long long i = 2; i * i <= n; i++) {
      if (n % i == 0) {
        return false;
      }
    }
  }
  return true;
}
void dec_num(long long n, vi &v) {
  long long a = 2;
  v.push_back(1);
  v.push_back(n);
  while (a * a <= n) {
    if (n % a == 0) {
      v.push_back(a);
      v.push_back(n / a);
    }
    a++;
  }
  sort((v).begin(), (v).end());
  v.erase(unique((v).begin(), (v).end()), v.end());
}
void dec_prime(long long n, vi &v) {
  long long a = 2;
  while (a * a <= n) {
    if (n % a == 0) {
      v.push_back(a);
      n /= a;
    } else {
      a++;
    }
  }
  v.push_back(n);
}
void dec_prime_e(long long n, map<long long, long long> &m) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      long long e = 0;
      while (n % i == 0) {
        e++;
        n /= i;
      }
      m[i] += e;
    }
  }
  if (n != 1) m[n]++;
}
long long sieve_prime(long long a, long long b) {
  if (a > b) swap(a, b);
  vb s(b + 1, true);
  long long cnt_a = 0, cnt_b = 0;
  for (long long i = 2; i <= b; i++) {
    for (long long j = 2; i * j <= b; j++) {
      s[i * j] = false;
    }
  }
  for (long long i = 2; i <= b; i++) {
    if (s[i]) {
      if (i < a) {
        cnt_a++;
      }
      cnt_b++;
    }
  }
  return cnt_b - cnt_a;
}
long long factorial(long long n) {
  long long a = 1, ret = 1;
  while (a < n) {
    a++;
    ret *= a;
  }
  return ret;
}
long long bit_count(long long n) {
  long long k = (long long)log2(n) + 1;
  long long ret = 0;
  for (LL i = 0; i < (k); i++) {
    if (n & (1LL << i)) ret++;
  }
  return ret;
}
long long XOR(long long a, long long b) {
  if (a == 0) {
    switch (b % 4) {
      case 0:
        return b;
      case 1:
        return 1;
      case 2:
        return (b + 1);
      case 3:
        return 0;
    }
  }
  long long A = XOR(0, a - 1);
  long long B = XOR(0, b);
  return (A ^ B);
}
const long long COMBMAX = 4000;
long long comb[COMBMAX + 5][COMBMAX + 5];
void init_comb() {
  comb[0][0] = 1;
  for (LL i = 0; i < (COMBMAX); i++) {
    for (LL j = 0; j < (i + 1); j++) {
      comb[i + 1][j] += comb[i][j];
      comb[i + 1][j + 1] += comb[i][j];
    }
  }
}
long long combination(long long n, long long k) {
  if (k < 0 || k > n)
    return 0;
  else
    return comb[n][k];
}
const long long COMBMODMAX = 5000000;
long long fac[COMBMODMAX + 5], facinv[COMBMODMAX + 5], inv[COMBMODMAX + 5];
void init_comb_mod() {
  fac[0] = fac[1] = 1;
  facinv[0] = facinv[1] = 1;
  inv[1] = 1;
  for (long long i = 2; i < COMBMODMAX; i++) {
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
    facinv[i] = facinv[i - 1] * inv[i] % MOD;
  }
}
long long comb_mod(long long n, long long k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (facinv[k] * facinv[n - k] % MOD) % MOD;
}
long long pow_mod(long long x, long long n, long long p) {
  if (n == 0) return 1;
  long long res = pow_mod(x * x % p, n / 2, p);
  if (n % 2 == 1) res = res * x % p;
  return res;
}
struct edge {
  long long to;
  long long cost;
};
using ve = vector<edge>;
using vve = vector<ve>;
signed main() {
  long long n;
  cin >> n;
  vi a(n);
  cin >> a;
  long long ans = 1000;
  long long k = 0;
  for (LL i = 0; i < (n - 1); i++) {
    if (a[i] < a[i + 1]) {
      k += ans / a[i];
      ans -= a[i] * k;
    } else {
      ans += a[i] * k;
      k = 0;
    }
  }
  cout << ans + k * a[n - 1];
}
