#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
ostream &operator<<(ostream &os, pair<T1, T2> &p);
template <class T>
ostream &operator<<(ostream &os, vector<T> &v);
template <class T>
ostream &operator<<(ostream &os, set<T> &v);
inline void optimizeIO() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
const int nmax = 80 + 7;
int main() {
  optimizeIO();
  int tc = 1;
  while (tc--) {
    int n;
    cin >> n;
    vector<int> v(n + 1);
    for (int i = 1; i <= n; i++) cin >> v[i];
    v[n + 1] = INT_MIN;
    int p1 = -1, p2 = 1;
    int cur = 1000;
    while (1) {
      if (p1 >= n || p2 >= n) break;
      bool hoise = false;
      for (int i = p2 + 1; i <= n + 1; i++)
        if (v[i] > v[i - 1]) {
          p1 = i - 1;
          hoise = true;
          break;
        }
      if (p1 == -1) break;
      if (!hoise) break;
      for (int i = p1 + 1; i <= n + 1; i++)
        if (v[i] < v[i - 1]) {
          p2 = i - 1;
          break;
        }
      int buy = cur / v[p1];
      int gain = (v[p2] - v[p1]) * buy;
      cur += gain;
      ;
      ;
      ;
    }
    cout << cur << endl;
  }
  return 0;
}
template <class T1, class T2>
ostream &operator<<(ostream &os, pair<T1, T2> &p) {
  os << "{" << p.first << ", " << p.second << "} ";
  return os;
}
template <class T>
ostream &operator<<(ostream &os, vector<T> &v) {
  os << "[ ";
  for (int i = 0; i < v.size(); i++) {
    os << v[i] << " ";
  }
  os << " ]";
  return os;
}
template <class T>
ostream &operator<<(ostream &os, set<T> &v) {
  os << "[ ";
  for (T i : v) {
    os << i << " ";
  }
  os << " ]";
  return os;
}
