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