#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const int INF = 1 << 30;
const ll LINF = 1LL << 60;
const int MOD = 1e9 + 7;
int main() {
  int N;
  cin >> N;
  vector<ll> A(N);
  for (int(i) = 0; (i) < (N); (i)++) cin >> A[i];
  ll now = 1000;
  ll kabu = 0;
  bool upper = (A[0] > A[1]);
  for (int i = 0; i < N; i++) {
    if (i + 1 == N || (upper && A[i] > A[i + 1])) {
      now += kabu * A[i];
      kabu = 0;
    } else if (!upper && A[i] < A[i + 1]) {
      int num = now / A[i];
      now -= A[i] * num;
      kabu += num;
    }
    if (i + 1 < N && A[i] < A[i + 1]) {
      upper = 1;
    } else if (i + 1 < N && A[i] > A[i + 1]) {
      upper = 0;
    }
  }
  cout << now << endl;
  return 0;
}
