#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n, 0);
  int as = 200, bi = 100;
  ll m = 1000;
  for (int64_t i = 0; i < (int64_t)(n); i++) {
    cin >> a[i];
    as = min(as, a[i]);
    bi = max(bi, a[i]);
    if (bi == a[i] && as < bi) {
      m += (bi - as) * (m / as);
      as = 200;
      bi = 100;
    }
  }
  cout << m;
}
