#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];
  int now = 1000;
  int kabu = 0;
  for (int(i) = 0; (i) < (N); (i)++) {
    now += kabu * A[i];
    kabu = 0;
    if (A[i + 1] > A[i]) {
      int num = now / A[i];
      now -= A[i] * num;
      kabu += num;
    }
  }
  now += A[N - 1] * kabu;
  cout << now << endl;
  return 0;
}
