#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a.at(i);
  long long money = 1000;
  long long kabu = 0;
  int start = a.at(0);
  for (int i = 1; i < n; i++) {
    if (start < a.at(i)) {
      while (money >= start) {
        money -= start;
        kabu++;
      }
      while (kabu > 0) {
        money += a.at(i);
        kabu--;
      }
      start = a.at(i);
    } else {
      start = a.at(i);
    }
  }
  cout << money << endl;
  return 0;
}
