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