#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using pll = pair<ll, ll>;
int main() {
  ll N;
  cin >> N;
  vec A;
  ll _a;
  cin >> _a;
  A.push_back(_a);
  for (ll(i) = (0), (i_len) = (N - 1); (i) < (i_len); ++(i)) {
    cin >> _a;
    if (A[((ll)(A).size()) - 1] != _a) A.push_back(_a);
  }
  if (((ll)(A).size()) == 1) {
    cout << (1000) << endl;
  } else {
    ll kane = 1000, kabu = 0;
    for (ll(i) = (0), (i_len) = (((ll)(A).size()) - 1); (i) < (i_len); ++(i)) {
      if (A[i] < A[i + 1]) {
        kabu = kane / A[i];
        kane -= kabu * A[i];
      } else {
        kane += kabu * A[i];
        kabu = 0;
      }
    }
    kane += kabu * A[((ll)(A).size()) - 1];
    cout << (kane) << endl;
  }
  return 0;
}
