#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<pair<int, int>> p;
  int u, d;
  u = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      d = i;
      p.push_back(make_pair(u, d));
      u = i + 1;
    }
  }
  p.push_back(make_pair(u, n - 1));
  int sum = 1000;
  for (int i = 0; i < p.size(); i++) {
    int buy = sum / a[p[i].first];
    sum -= buy * a[p[i].first];
    sum += buy * a[p[i].second];
  }
  cout << sum << endl;
}
