#include <bits/stdc++.h>
using namespace std;
using P = pair<long long, long long>;
const long long mod = 1e9 + 7;
template <class T>
inline void chmin(T& a, T b) {
  if (a > b) {
    a = b;
  }
}
template <class T>
inline void chmax(T& a, T b) {
  if (a < b) {
    a = b;
  }
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(12);
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long(i) = 0; (i) < (N); (i)++) cin >> A[i];
  long long kawanai = 1000;
  long long kabu = 0;
  long long mon = 1000;
  for (long long(i) = 0; (i) < (N - 1); (i)++) {
    if (kawanai >= mon + kabu * A[i]) {
      kabu = 0;
      mon = kawanai;
    } else {
      kawanai = mon + kabu * A[i];
    }
    kabu = mon / A[i];
    mon = mon % A[i];
  }
  mon += kabu * A[N - 1];
  cout << max(mon, kawanai) << "\n";
}
