#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 ll = long long;
using ull = unsigned long long;
using ld = long double;
const ll MOD = 1000000007;
const ll INF = 1e18;
const double PI = acos(-1);
using namespace std;
struct INIT {
  INIT() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
  }
} INIT;
signed main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (ll i = 0; i < ll(N); ++i) cin >> A[i];
  ll ans = 1000;
  ll MIN = A[0];
  for (ll i = 0; i < ll(N); ++i) {
    if (i != 0 && MIN < A[i]) {
      ll cnt = ans / MIN;
      ans -= cnt * MIN;
      ans += cnt * A[i];
      MIN = INF;
    } else {
      chmin(MIN, A[i]);
    }
  }
  cout << ans << "\n";
  return 0;
}
