#include <bits/stdc++.h>
template <typename T>
void view(T e) {
  std::cout << e << std::endl;
}
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 <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 ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
void Main() {
  int N;
  cin >> N;
  vl A(N);
  for (int i = (0); i < (N); ++i) cin >> A[i];
  ll sum = 1000;
  using p = pair<int, int>;
  vector<p> ps;
  int cur = -1;
  int cand = -1;
  for (int i = (0); i < (N); ++i) {
    if (cur == -1) {
      cur = A[i];
      continue;
    } else if (A[i] >= cur && A[i] >= cand) {
      cand = A[i];
    } else {
      if (cur != -1 && cand != -1) {
        ps.emplace_back(cur, cand);
      }
      cur = -1;
      cand = -1;
    }
  }
  if (cur != -1 && cand != -1) {
    ps.emplace_back(cur, cand);
  }
  for (int i = (0); i < (ps.size()); ++i) {
    ll n = sum / ps[i].first;
    sum -= n * ps[i].first;
    sum += n * ps[i].second;
  }
  cout << sum << endl;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Main();
}
