#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << '=' << h << ',';
  _dbg(sdbg + 1, a...);
}
const int maxn = 1e5 + 100;
int n;
int a[200];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  int res = 1000, sto = 0;
  int i = 0;
  while (i < n - 1) {
    if (a[i] <= a[i + 1]) {
      sto += res / a[i];
      res -= (res / a[i]) * a[i];
    } else {
      res += sto * (a[i]);
      sto = 0;
    }
    i++;
  }
  if (sto) res += sto * a[n - 1];
  cout << res << endl;
  return 0;
}
