#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vs = vector<string>;
using vc = vector<char>;
using vd = vector<double>;
using vvd = vector<vector<double>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vvp = vector<vector<pair<int, int>>>;
template <typename T>
using ve = vector<T>;
template <typename T>
using pq2 = priority_queue<T>;
template <typename T>
using pq1 = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  vi A(N);
  for (int i = 0; i < (N); i++) {
    cin >> A[i];
  };
  bool f = true;
  int d = 0;
  int mon = 1000;
  int pap = 0;
  while (d < N) {
    if (f) {
      if (d == N - 1)
        break;
      else if (A[d] < A[d + 1]) {
        pap = mon / A[d];
        mon -= pap * A[d];
        f = false;
      }
    } else {
      if (d == N - 1) {
        mon += pap * A[d];
        pap = 0;
        f = true;
      } else if (A[d] > A[d + 1]) {
        mon += pap * A[d];
        pap = 0;
        f = true;
      }
    }
    d++;
  }
  cout << mon << endl;
  return 0;
}
