#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
using uint = unsigned int;
template <typename T>
using Graph = vector<vector<T>>;
const int MOD = 1e9 + 7;
const ld PI = acosl(-1);
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(N), rmax(N + 1);
  for (int i = 0; i < N; ++i) cin >> A[i];
  ll ans = 1000;
  int mi = A[0];
  for (int i = 0; i < N; ++i) {
    if (A[i] < mi) {
      mi = A[i];
      continue;
    }
    if (A[i] > mi) {
      ll tmp = ans / mi;
      ans += (ll)tmp * (A[i] - mi);
      if (i + 1 < N) mi = A[i + 1];
    }
  }
  cout << ans << endl;
  return 0;
}
