#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Vec = vector<ll>;
using P = pair<ll, ll>;
using VecP = vector<P>;
int main() {
  ll N;
  cin >> N;
  Vec A(N);
  for (ll i = 0; i < (N); i++) {
    cin >> A[i];
  }
  ll ans = 1000;
  ll stock = 0;
  for (ll i = 0; i < (N - 1); i++) {
    if (A[i] < A[i + 1]) {
      stock += ans / A[i];
      ans -= stock * A[i];
    } else if (A[i] > A[i + 1]) {
      ans += stock * A[i];
      stock = 0;
    }
  }
  ans += stock * A[N - 1];
  cout << ans << endl;
  return 0;
}
