#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll i, j;
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (i = 0; i < n; ++i) {
    cin >> a.at(i);
  }
  ll ans = 1000;
  ll pre = a.at(0);
  ll now = a.at(0);
  bool flag = true;
  for (i = 1; i < n; ++i) {
    if (flag) {
      if (a.at(i) > now)
        now = a.at(i);
      else {
        ll kabu = ans / pre;
        ans -= kabu * pre;
        ans += kabu * now;
        now = a.at(i);
        flag = false;
      }
    } else {
      if (a.at(i) < now)
        now = a.at(i);
      else {
        pre = now;
        now = a.at(i);
        flag = true;
      }
    }
  }
  if (now > pre) {
    ll kabu = ans / pre;
    ans -= kabu * pre;
    ans += kabu * now;
  }
  cout << ans << endl;
  return 0;
}
