#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
template <class... Args>
istream& read_args(Args&... args) {
  return (cin >> ... >> args);
}
template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
  for (auto& i : v) is >> i;
  return is;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T>& v) {
  for (auto& i : v) os << i << ' ';
  return os;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    long long n;
    read_args(n);
    vector<long long> a(n);
    cin >> a;
    long long cash = 1000;
    for (long long i = (0); i < (long long)(n); i++) {
      long long ini = a[i];
      long long pos = i;
      for (long long j = (i + 1); j < (long long)(n); j++) {
        if (a[j] < ini) break;
        if (a[j] > ini) {
          pos = j;
          break;
        }
      }
      if (pos != i) {
        long long st = cash / ini;
        cash %= ini;
        cash += st * a[pos];
        i = pos;
      }
    }
    cout << cash << "\n";
  }
  cerr << "Time taken : " << (long double)(clock()) / CLOCKS_PER_SEC << "s"
       << "\n";
}
