#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  a.push_back(0);
  int mi = a.at(0);
  int ma = a.at(0);
  int s = 1000;
  for (int i = 1; i <= n; i++) {
    if (a.at(i - 1) > a.at(i)) {
      s += (ma - mi) * (s / mi);
      mi = a.at(i);
      ma = a.at(i);
    } else
      ma = a.at(i);
  }
  cout << s << endl;
}
