#include <bits/stdc++.h>
const long long MOD = 1000000007;
const long long inf = 1e18;
using namespace std;
long long int modpow(long long int x, long long int n) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % MOD;
    x = x * x % MOD;
    n >>= 1;
  }
  return res;
}
long long int power(long long int x, long long int n) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1) res = res * x;
    x = x * x;
    n >>= 1;
  }
  return res;
}
void solve() {
  int n;
  cin >> n;
  std::vector<int> v(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  int m = 1000;
  int f = 0;
  for (int i = 1; i <= n; i++) {
    if (i < n && v[i + 1] >= v[i]) {
      if (f == 0) {
        f = m / v[i];
        m -= f * v[i];
      }
    } else if (i == n || v[i + 1] < v[i]) {
      if (f) {
        m += f * v[i];
        f = 0;
      }
    }
  }
  cout << m << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  int t = 1, tt = 1;
  while (tt <= t) {
    solve();
    tt++;
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
}
