#include <bits/stdc++.h>
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using namespace std;
using P = pair<int, int>;
using ll = long long;
const ll INF = 1LL << 60;
const double PI = 3.1415926535897932;
const int MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int ans = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      ans += (a[i + 1] - a[i]) * (ans / a[i]);
    } else if (a[i] > a[i + 1]) {
      auto itr = max_element(a.begin() + (i + 1), a.end());
      int maxn = *itr;
      int pos = itr - a.begin();
      if (maxn != a[i + 1]) {
        ans += (maxn - a[i + 1]) * (ans / a[i + 1]);
        i = pos - 1;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
