#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, kane = 1000, kabu = 0;
  cin >> n;
  vector<int> array(n);
  for (int i = 0; i < n; i++) cin >> array.at(i);
  if (array.at(0) < array.at(1)) {
    kabu = kane / array.at(0);
    kane = kane % array.at(0);
  }
  for (int i = 1; i < n - 1; i++) {
    if (array.at(i) - array.at(i - 1) <= 0 &&
        array.at(i + 1) - array.at(i) > 0) {
      kabu = kane / array.at(i);
      kane = kane % array.at(i);
    } else if (array.at(i) - array.at(i - 1) >= 0 &&
               array.at(i + 1) - array.at(i) < 0) {
      kane = kane + array.at(i) * kabu;
      kabu = 0;
    }
  }
  if (kabu > 0) {
    kane += kabu * array.at(n - 1);
  }
  cout << kane << endl;
}
