#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  ll ans = 1000;
  int stake = 0;
  bool inc = false;
  for (int i = 0; i < (n - 1); ++i) {
    if (inc) {
      if (a[i] <= a[i + 1]) {
        continue;
      } else {
        ans += a[i] * stake;
        stake = 0;
        inc = false;
      }
    } else {
      if (a[i] >= a[i + 1]) {
        continue;
      } else {
        stake = ans / a[i];
        ans -= a[i] * stake;
        inc = true;
      }
    }
  }
  ans += a[n - 1] * stake;
  cout << ans << endl;
}
