#include <bits/stdc++.h>
using namespace std;
constexpr long long MOD = 1e9 + 7;
long long dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
long long dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
long long A, B, C, D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;
long long ans = 0;
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
  for (T &x : vec) is >> x;
  return is;
}
signed main() {
  cin >> N;
  vector<long long> a(N);
  cin >> a;
  long long cnt = 0;
  long long m = 1000;
  long long prev;
  if (a[0] < a[1]) {
    prev = 1;
    cnt += m / a[0];
    m %= a[0];
  } else {
    prev = 0;
  }
  for (long long i = 1; i <= (long long)(N - 2); i++) {
    ;
    long long now;
    if (a[i] == a[i + 1]) continue;
    if (a[i] < a[i + 1]) {
      now = 1;
    } else {
      now = 0;
    }
    if (prev == now) {
      continue;
    } else {
      if (now) {
        cnt += m / a[i];
        m %= a[i];
      } else {
        m += cnt * a[i];
        cnt = 0;
      }
    }
    prev = now;
  }
  if (a[N - 1] > a[N - 2]) {
    m += cnt * a[N - 1];
    cnt = 0;
  }
  cout << m << "\n";
}
