#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> as(n);
  for (int i = 0; i < n; i++) cin >> as[i];
  as.erase(unique(as.begin(), as.end()), as.end());
  int kane = 1000;
  int kabu = 0;
  for (int i = 1; i < as.size(); i++) {
    if (as[i - 1] < as[i]) {
      kabu += kane / as[i - 1];
      kane %= as[i - 1];
    } else {
      kane += kabu * as[i - 1];
      kabu = 0;
    }
  }
  kane += kabu * as.back();
  cout << kane << endl;
}
