#include <bits/stdc++.h>
using namespace std;
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;
}
void vout(vector<long long> &v) {
  for (long long i = 0; i < (v).size(); i++) cout << v[i] << " ";
  cout << "\n";
}
void vout(vector<string> &v) {
  for (long long i = 0; i < (v).size(); i++) cout << v[i] << " ";
  cout << "\n";
}
void vvout(vector<vector<long long> > &v) {
  for (long long i = 0; i < (v).size(); i++) vout(v[i]);
}
void vin(vector<long long> &v) {
  long long n = v.size();
  for (long long i = 0; i < n; ++i) cin >> v[i];
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long mypow(long long x, long long n, long long m = 998244353) {
  if (n == 0) return 1;
  if (n % 2 == 0)
    return mypow(x * x % m, n / 2, m);
  else
    return x * mypow(x, n - 1, m) % m;
}
long long digit(long long k, long long i) {
  string s = to_string(k);
  return s[s.size() - i] - '0';
}
void uniq(vector<long long> &v) {
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
}
long long ctoi(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  return 0;
}
long long leng(long long n) {
  string s = to_string(n);
  return s.size();
}
long long digitsum(long long n) {
  long long ret = 0;
  while (n > 0) {
    ret += n % 10;
    n /= 10;
  }
  return ret;
}
long long lesscount(long long x, vector<long long> &a) {
  return lower_bound(a.begin(), a.end(), x) - a.begin();
}
long long orlesscount(long long x, vector<long long> &a) {
  return upper_bound(a.begin(), a.end(), x) - a.begin();
}
long long morecount(long long x, vector<long long> &a) {
  return a.size() - orlesscount(x, a);
}
long long ormorecount(long long x, vector<long long> &a) {
  return a.size() - lesscount(x, a);
}
long long iscount(long long x, vector<long long> &a) {
  return upper_bound((a).begin(), (a).end(), x) -
         lower_bound((a).begin(), (a).end(), x);
}
vector<long long> accum(vector<long long> &v) {
  vector<long long> ret((v).size() + 1);
  for (long long i = 0; i < (v).size(); ++i) ret[i + 1] = ret[i] + v[i];
  return ret;
}
bool comp(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.second != b.second)
    return a.second < b.second;
  else
    return a.first < b.first;
}
struct mint {
  long long x;
  mint(long long x = 0) : x((x % 998244353 + 998244353) % 998244353) {}
  mint operator-() const { return mint(-x); }
  mint &operator+=(const mint a) {
    if ((x += a.x) >= 998244353) x -= 998244353;
    return *this;
  }
  mint &operator-=(const mint a) {
    if ((x += 998244353 - a.x) >= 998244353) x -= 998244353;
    return *this;
  }
  mint &operator*=(const mint a) {
    (x *= a.x) %= 998244353;
    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(998244353 - 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; }
void vout(vector<mint> &v) {
  for (long long i = 0; i < (v).size(); i++) cout << v[i] << " ";
  cout << "\n";
}
void vvout(vector<vector<mint> > &v) {
  for (long long i = 0; i < (v).size(); i++) vout(v[i]);
}
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  vector<long long> a2;
  bool check = 0;
  for (long long i = 0; i < n; ++i) {
    if (check) {
      if (a[i] > a[i + 1]) {
        a2.push_back(a[i]);
        check = 0;
      }
    } else {
      if (a[i] < a[i + 1]) {
        a2.push_back(a[i]);
        check = 1;
      }
    }
  }
  if (check) {
    if (a[n - 2] < a[n - 1]) {
      a2.push_back(a[n - 1]);
    }
  } else {
    if (a[n - 2] > a[n - 1]) {
      a2.push_back(a[n - 1]);
    }
  }
  if (a2.size() == 1) {
    cout << 1000 << "\n";
    return 0;
  }
  long long money = 1000, kabu = 0;
  for (long long i = 0; i < a2.size(); ++i) {
    if (i % 2 == 0) {
      kabu = money / a2[i];
      money %= a2[i];
    } else {
      money += kabu * a2[i];
      kabu = 0;
    }
  }
  cout << money << "\n";
  return 0;
}
