#include <bits/stdc++.h>
using namespace std;
struct Fast {
  Fast() {
    std::cin.tie(0);
    ios::sync_with_stdio(false);
  }
} fast;
using ll = long long;
using ull = unsigned long long;
using uint = unsigned int;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using plglg = pair<ll, ll>;
using tlglglg = tuple<ll, ll, ll>;
using D = double;
using P = complex<D>;
using vs = vector<string>;
template <typename T>
using PQ = priority_queue<T>;
template <typename T>
using minPQ = priority_queue<T, vector<T>, greater<T>>;
const int INF = 1001001001;
const ll LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7;
const D EPS = 1e-9;
const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1},
          dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
inline bool inside(int y, int x, int H, int W) {
  return y >= 0 && x >= 0 && y < H && x < W;
}
inline int in() {
  int x;
  cin >> x;
  return x;
}
inline ll IN() {
  ll x;
  cin >> x;
  return x;
}
inline vs split(const string& t, char c) {
  vs v;
  stringstream s(t);
  string b;
  while (getline(s, b, c)) v.emplace_back(b);
  return v;
}
template <typename T>
inline bool chmin(T& a, const T& b) {
  if (a > b) a = b;
  return a > b;
}
template <typename T>
inline bool chmax(T& a, const T& b) {
  if (a < b) a = b;
  return a < b;
}
template <typename T, typename S>
inline void print(const pair<T, S>& p) {
  cout << p.first << " " << p.second << endl;
}
template <typename T>
inline void print(const T& x) {
  cout << x << endl;
}
template <typename T, typename S>
inline void print(const vector<pair<T, S>>& v) {
  for (auto&& p : v) print(p);
}
template <typename T>
inline void print(const vector<T>& v, string s = " ") {
  for (ll i = (0); i < (ll)(v.size()); ++i)
    cout << v[i] << (i != (ll)v.size() - 1 ? s : "\n");
}
inline void yesno(bool ok, string yes = "Yes", string no = "No") {
  cout << (ok ? yes : no) << endl;
}
signed main() {
  int n;
  cin >> n;
  vi a(n + 1);
  for (ll i = (0); i < (ll)(n); ++i) cin >> a[i];
  a[n] = 0;
  int maxmoney = 1000;
  int money = 1000;
  int stock = 0;
  for (ll i = (0); i < (ll)(n); ++i) {
    if (a[i] < a[i + 1]) {
      stock += money / a[i];
      money -= a[i] * stock;
    } else if (a[i] > a[i + 1]) {
      money += stock * a[i];
      stock = 0;
      chmax(maxmoney, money);
    }
  }
  print(maxmoney);
  return 0;
}
