#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  vector<int> b(n + 1);
  int max = 0;
  int min = 1000;
  for (int i = 1; i <= n; i++) {
    cin >> a.at(i);
    if (max <= a.at(i)) {
      max = a.at(i);
    }
    if (a.at(i - 1) < a.at(i)) {
      b.at(i - 1) = 1;
    }
  }
  int cash = 1000;
  int stock = 0;
  for (int i = 1; i <= n; i++) {
    if (b.at(i) == 0) {
      cash += stock * a.at(i);
      stock = 0;
    }
    if (b.at(i) == 1) {
      stock = cash / a.at(i);
      cash = cash - a.at(i) * stock;
    }
  }
  cout << cash << endl;
}
