#include <bits/stdc++.h>
using namespace std;
long long mm = 1000000000;
long long MM = mm + 7;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  int mon = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a.at(i) < a.at(i + 1)) {
      int st = mon / a.at(i);
      mon += st * (a.at(i + 1) - a.at(i));
    }
  }
  cout << mon << endl;
}
