#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1001001001;
ll gcd(ll a, ll b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
ll factorial(ll n) {
  ll a = 1;
  ll b = n;
  for (int i = 0; i < n; i++) {
    a *= b;
    b--;
  }
  return a;
}
ll comb(ll a, ll b) {
  ll c;
  c = factorial(a) / (factorial(a - b) * factorial(b));
  return c;
}
int main(void) {
  cout << fixed << setprecision(14);
  ll N;
  cin >> N;
  vector<ll> vec(N);
  ll M = 1000;
  ll K = 0;
  ll mx = 0;
  ll Q = 0;
  for (int i = 0; i < N; i++) {
    cin >> vec[i];
    mx = max(mx, vec[i]);
    if (vec[i] == mx) {
      Q = i;
    }
  }
  for (int i = 0; i < Q + 1; i++) {
    if (i == Q) {
      M = M + K * vec[i];
      break;
    }
    if (vec[i] < vec[i + 1]) {
      K = M / vec[i];
      M = M - K * vec[i];
    }
    if (vec[i] > vec[i + 1]) {
      M = M + K * vec[i];
      K = 0;
    }
    cout << "M=" << M << " "
         << "K=" << K << endl;
  }
  cout << M << endl;
}
