#include <bits/stdc++.h>
using namespace std;
using graph = vector<vector<int>>;
const double pi = 3.14159265358979323846;
const long long mod = 1000000007;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  int mny = 1000, keep = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a.at(i) < a.at(i + 1)) {
      mny += keep * a.at(i);
      keep = mny / a.at(i);
      mny -= a.at(i) * keep;
    } else if (a.at(i) == a.at(i + 1))
      continue;
    else {
      mny += a.at(i) * keep;
      keep = 0;
    }
  }
  cout << keep * a.at(n - 1) + mny << endl;
}
