#include <bits/stdc++.h>
using namespace std;
const long long INF = (1 << 30) - 1;
const long long LLINF = (1LL << 60LL);
const long long MOD = 1000000007;
const long long mod = 998244353;
const long long MAX = 2100000;
const double pi = acos(-1);
const double eps = 1e-10;
long long dx[8] = {1, 0, -1, 0, 1, -1, 1, -1};
long long dy[8] = {0, 1, 0, -1, 1, -1, -1, 1};
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 solve() {
  long long n;
  long long a[100];
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long b[100] = {};
  b[n - 1] = a[n - 1];
  for (long long i = n - 2; i >= 0; i--) {
    b[i] = max(a[i], b[i + 1]);
  }
  long long ans = 1000, now = a[0], cnt = 0;
  for (long long i = 0; i < n; i++) {
    if (now < a[i]) {
      ans += cnt * a[i];
      cnt = 0;
    }
    bool ok = false;
    for (long long k = i; k < n; k++) {
      if (a[i] > a[k] && a[k] < b[k]) {
        ok = true;
      }
    }
    if (!ok) {
      long long x = ans / a[i];
      cnt += x;
      ans -= x * a[i];
      now = a[i];
    }
  }
  if (cnt > 0) {
    ans += a[n - 1] * cnt;
  }
  cout << max(1000ll, ans) << endl;
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  solve();
  return 0;
}
