#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long INF = 1e7;
double EPS = 1e-12;
const long long lim = 2e5 + 100;
template <typename T1>
void printIt(T1 t1) {
  cout << t1 << " )" << endl;
}
template <typename T1, typename... T2>
void printIt(T1 t1, T2... t2) {
  cout << t1 << " , ";
  printIt(t2...);
}
long long powP(long long x, long long y) {
  long long ans = 1, po = x % mod;
  while (y > 0) {
    if (y & 1) ans = ans * po % mod;
    y >>= 1;
    po = po * po % mod;
  }
  return ans;
}
vector<long long> V;
long long Array[lim], C[lim];
pair<long long, long long> dp[lim][2];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int T, i, p, j, l, e, r, b, c, k, m, q, a, d, w, x, y, u, v, z, t,
      curr, prev, sum = 0, val, countA = 0, indicator = 0, pos, h, minA, maxA,
                  type, n, ans = 0, left, right;
  cin >> n;
  dp[0][0] = make_pair(1000, 0);
  for (int i = 1; i <= n; i++) {
    cin >> Array[i];
    dp[i][0] =
        make_pair(max(dp[i - 1][0].first,
                      dp[i - 1][1].second * Array[i] + dp[i - 1][1].first),
                  0);
    dp[i][1] = make_pair(
        dp[i - 1][0].first - (dp[i - 1][0].first / Array[i]) * Array[i],
        dp[i - 1][0].first / Array[i]);
  }
  cout << dp[n][0].first << endl;
  return 0;
}
