#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline void dump(vector<T> v) {
  for (auto& x : v) cerr << x << " ";
  cerr << endl;
}
template <class T>
inline void dump(vector<pair<T, T>> v) {
  for (auto& p : v) cerr << p.first << " " << p.second << endl;
}
template <class T>
inline void dump(vector<vector<T>> vv) {
  for (auto& v : vv) {
    for (auto& x : v) cerr << x << " ";
    cerr << endl;
  }
}
constexpr int INF = 1001001001;
constexpr long long INFL = (1LL << 60);
constexpr double eps = (1e-9);
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  ll cash = 1000;
  ll stock = 0;
  for (int i = 0; i < n - 1; i++) {
    if (cash > 0) {
      if (a[i] < a[i + 1]) {
        stock = cash / a[i];
        cash %= a[i];
      }
    }
    if (stock > 0) {
      if (a[i] > a[i + 1]) {
        cash += stock * a[i];
        stock = 0;
      }
    }
  }
  if (stock > 0) cash += stock * a[n - 1];
  cout << cash << endl;
  return 0;
}
