#include <bits/stdc++.h>
using namespace std;
using pll = pair<long long, long long>;
using Graph = vector<vector<long long>>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const int inf = 1001001001;
const long long INF = 1LL << 60;
const long long mod = 1000000007;
const long double pi = acos(-1);
class UnionFind {
 public:
  vector<long long> par;
  vector<long long> siz;
  UnionFind(long long sz_) : par(sz_), siz(sz_, 1LL) {
    for (long long i = 0; i < sz_; i++) par[i] = i;
  }
  void init(long long sz_) {
    par.resize(sz_);
    siz.assign(sz_, 1LL);
    for (long long i = 0; i < sz_; i++) par[i] = i;
  }
  long long root(long long x) {
    while (par[x] != x) {
      x = par[x] = par[par[x]];
    }
    return x;
  }
  bool unite(long long x, long long y) {
    x = root(x);
    y = root(y);
    if (x == y) return false;
    if (siz[x] < siz[y]) swap(x, y);
    siz[x] += siz[y];
    par[y] = x;
    return true;
  }
  bool same(long long x, long long y) { return root(x) == root(y); }
  long long size(long long x) { return siz[root(x)]; }
};
struct segment_tree {
  long long n;
  long long m;
  vector<long long> v;
  long long id_e;
  long long binary_op(long long a, long long b) { return a + b; }
  void build(vector<long long> a, long long b) {
    id_e = b;
    m = 1;
    while (m < (long long)a.size()) m *= 2;
    n = 2 * m - 1;
    v.resize(n);
    for (long long i = 0; i < (long long)a.size(); i++) v[m - 1 + i] = a[i];
    for (long long i = a.size(); i < m; i++) v[m - 1 + i] = id_e;
    for (long long i = m - 2; i >= 0; i--) {
      v[i] = binary_op(v[2 * i + 1], v[2 * i + 2]);
    }
  }
  void update(long long a, long long b) {
    a += (m - 1);
    v[a] = b;
    while ((a - 1) / 2 != a) {
      a = (a - 1) / 2;
      v[a] = binary_op(v[2 * a + 1], v[2 * a + 2]);
    }
  }
  long long seg_sub(long long a, long long b, long long cur, long long l,
                    long long r) {
    if (a <= l && r <= b) return v[cur];
    if (r < a || b < l) return id_e;
    return binary_op(seg_sub(a, b, 2 * cur + 1, l, (l + r) / 2),
                     seg_sub(a, b, 2 * cur + 2, (l + r) / 2 + 1, r));
  }
  long long partial_sum(long long a, long long b) {
    return seg_sub(a, b, 0, 0, m - 1);
  }
};
struct edge {
  long long to, cost;
};
struct graph_d {
  long long V;
  vector<vector<edge>> G;
  vector<long long> d;
  graph_d(long long n) { init(n); }
  void init(long long n) {
    V = n;
    G.resize(V);
    d.resize(V);
    for (long long i = 0; i < (long long)(V); i++) {
      d[i] = INF;
    }
  }
  void add_edge(long long s, long long t, long long cost) {
    edge e;
    e.to = t, e.cost = cost;
    G[s].push_back(e);
  }
  void dijkstra(long long s) {
    for (long long i = 0; i < (long long)(V); i++) {
      d[i] = INF;
    }
    d[s] = 0;
    priority_queue<pll, vector<pll>, greater<pll>> que;
    que.push(pll(0, s));
    while (!que.empty()) {
      pll p = que.top();
      que.pop();
      long long v = p.second;
      if (d[v] < p.first) continue;
      for (auto e : G[v]) {
        if (d[e.to] > d[v] + e.cost) {
          d[e.to] = d[v] + e.cost;
          que.push(pll(d[e.to], e.to));
        }
      }
    }
  }
};
long long modpow(long long x, long long n) {
  x = x % mod;
  if (n == 0)
    return 1;
  else if (n % 2 == 1) {
    return (x * modpow(x, n - 1)) % mod;
  } else
    return modpow((x * x) % mod, n / 2) % mod;
}
long long modcom(long long n, long long k) {
  long long x = 1;
  for (long long i = n - k + 1; i <= n; i++) {
    x = x * i % mod;
  }
  long long y = 1;
  for (long long i = 1; i <= k; i++) {
    y = y * i % mod;
  }
  y = modpow(y, mod - 2);
  return x * y % mod;
}
bool is_prime(long long n) {
  switch (n) {
    case 0:
    case 1:
      return false;
    case 2:
    case 3:
      return true;
  }
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i += 6) {
    if (n % i == 0) return false;
    if (n % (i + 2) == 0) return false;
  }
  return true;
}
long long digsum(long long n) {
  int res = 0;
  while (n > 0) {
    res += n % 10;
    n /= 10;
  }
  return res;
}
vector<long long> divisor(long long n) {
  vector<long long> ret;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(ret.begin(), ret.end());
  return ret;
}
vector<long long> divisor_cnt(long long n) {
  vector<long long> cnt(n);
  for (long long i = 1; i <= n; i++) {
    for (long long j = i; j <= n; j += i) {
      cnt[j]++;
    }
  }
  return cnt;
}
map<long long, long long> prime_factor(long long n) {
  map<long long, long long> res;
  res[1] = 1;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      res[i]++;
      n /= i;
    }
  }
  if (n != 1) res[n] = 1;
  return res;
}
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 { return mint(*this) += a; }
  mint operator-(const mint a) const { return mint(*this) -= a; }
  mint operator*(const mint a) const { return mint(*this) *= 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 { return mint(*this) /= a; }
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x; }
ostream& operator<<(ostream& os, const mint& a) { return os << a.x; }
struct combination {
  vector<mint> fact, ifact;
  combination(int n) : fact(n + 1), ifact(n + 1) {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i;
  }
  mint operator()(int n, int k) {
    if (k < 0 || k > n) return 0;
    return fact[n] * ifact[k] * ifact[n - k];
  }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)(n); i++) {
    cin >> a[i];
  }
  long long mon = 1000;
  for (long long i = 0; i < (long long)(n); i++) {
    if (a[i] < a[i + 1]) {
      long long x = mon / a[i];
      mon -= (x * a[i]);
      mon += (x * a[i + 1]);
    }
  }
  cout << mon << endl;
}
