#include <bits/stdc++.h>
const double INF = 1e+09;
const int MOD = 1e9 + 7;
using namespace std;
template <typename _Ty>
ostream& operator<<(ostream& ostr, const vector<_Ty>& v) {
  if (v.empty()) {
    ostr << "{ }";
    return ostr;
  }
  ostr << "{" << v.front();
  for (auto itr = ++v.begin(); itr != v.end(); itr++) {
    ostr << ", " << *itr;
  }
  ostr << "}";
  return ostr;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int gcd(int a, int b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
int lcm(int a, int b) { return a * b / gcd(a, b); }
vector<int> uniq(vector<int> vec) {
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
  return vec;
}
vector<long long> divisor(long long n) {
  vector<long long> ret;
  for (int64_t i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(begin(ret), end(ret));
  return (ret);
}
void permu(int n) {
  vector<int> perm(n);
  for (int i = (0); i < (n); ++i) perm[i] = i;
  do {
    cout << perm << endl;
  } while (next_permutation(perm.begin(), perm.end()));
  return;
}
vector<pair<long long, int>> prime_div(long long n) {
  vector<pair<long long, int>> res;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      int a = 0;
      while (n % i == 0) {
        n /= i;
        a++;
      }
      pair<long long, int> tmp;
      tmp.first = i;
      tmp.second = a;
      res.push_back(tmp);
    }
  }
  if (n != 1) {
    pair<long long, int> now;
    now.first = n;
    now.second = 1;
    res.push_back(now);
  }
  return res;
}
int main(void) {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = (0); i < (n); ++i) cin >> a[i];
  int init = 1000;
  for (int i = (0); i < (n - 1); ++i) {
    if (a[i + 1] > a[i]) {
      int kabu = init / a[i];
      int amari = init % a[i];
      int next = kabu * a[i + 1] + amari;
      init = next;
    }
  }
  cout << init << endl;
  return 0;
}
