#include <bits/stdc++.h>
using namespace std;
template <class S>
S sum(vector<S> &a) {
  return accumulate(a.begin(), a.end(), S());
}
template <class S>
S max(vector<S> &a) {
  return *max_element(a.begin(), a.end());
}
template <class S>
S min(vector<S> &a) {
  return *min_element(a.begin(), a.end());
}
long long max(int a, long long b) { return max((long long)a, b); }
long long max(long long a, int b) { return max(a, (long long)b); }
long long min(int a, long long b) { return min((long long)a, b); }
long long min(long long a, int b) { return min(a, (long long)b); }
template <class S>
void print(vector<S> &v) {
  for (long long i = 0; i < (long long)v.size(); i++) {
    cerr << v[i] << ' ';
  }
  cerr << endl;
}
template <class S>
void print(vector<vector<S>> &v) {
  for (long long i = 0; i < (long long)v.size(); i++) {
    for (long long j = 0; j < (long long)v[i].size(); j++) {
      cerr << v[i][j] << ' ';
    }
    cerr << endl;
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  vector<pair<int, int>> m;
  int l, h;
  bool isup = false;
  for (long long i = 0; i < (long long)(n - 1); i++) {
    if (isup) {
      if (a[i + 1] < a[i]) {
        h = a[i];
        m.push_back(make_pair(l, h));
        isup = false;
      }
    } else {
      if (a[i] < a[i + 1]) {
        l = a[i];
        isup = true;
      }
    }
  }
  if (isup) {
    m.push_back(make_pair(l, a[n - 1]));
  }
  int money = 1000;
  for (auto [l, h] : m) {
    money += (h - l) * (money / l);
  }
  cout << money << endl;
}
