#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 mx = a.at(0);
  set<int> top;
  for (int i = 0; i < n - 1; i++) {
    if (a.at(i) > a.at(i + 1)) {
      if (a.at(i) > mx) {
        mx = a.at(i);
        top.insert(i);
      }
    }
  }
  if (a.at(n - 1) > a.at(n - 2)) {
    if (a.at(n - 1) > mx) {
      top.insert(n - 1);
    }
  }
  if (top.size() == 0)
    cout << 1000 << endl;
  else {
    int mon = 1000;
    int mn = a.at(0);
    for (int i = 0; i < n; i++) {
      mn = min(mn, a.at(i));
      if (top.count(i)) {
        int st = mon / mn;
        mon += st * (a.at(i) - mn);
        mn = a.at(i);
      }
    }
    cout << mon << endl;
  }
}
