#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using vint = vector<int>;
using vvint = vector<vint>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vchar = vector<char>;
using vvchar = vector<vchar>;
using vp = vector<P>;
using vpp = vector<pair<P, P>>;
using vvp = vector<vp>;
istream &operator>>(istream &is, P &a) { return is >> a.first >> a.second; }
ostream &operator<<(ostream &os, const P &a) {
  return os << "(" << a.first << "," << a.second << ")";
}
template <typename T>
void view(const std::vector<T> &v) {
  for (const auto &e : v) {
    std::cout << e << " ";
  }
  std::cout << std::endl;
}
template <typename T>
void view(const std::vector<std::vector<T>> &vv) {
  for (const auto &v : vv) {
    view(v);
  }
}
template <typename T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  vll a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  ll ans = 1000;
  ll stock = 0;
  for (int i = 0; i < n; ++i) {
    if (i < n - 1) {
      if (a[i + 1] > a[i]) {
        int buy = ans / a[i];
        stock += buy;
        ans -= buy * a[i];
      }
      if (a[i + 1] < a[i]) {
        int sell = stock;
        ans += stock * a[i];
        stock = 0;
      }
    } else {
      ans += stock * a[i];
    }
  }
  cout << ans << endl;
  return 0;
}
