#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int main() {
  int budget = 1000;
  int N;
  cin >> N;
  vector<int> A(N + 1);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int kabu = 0;
  if (A[0] < A[1]) {
    kabu = budget / A[0];
    budget = budget - kabu * A[0];
  }
  for (int i = 1; i < N - 1; i++) {
    if (A[i] > A[i - 1]) {
      budget = budget + kabu * A[i];
      kabu = 0;
      if (A[i + 1] > A[i]) {
        kabu = budget / A[i];
        budget = budget - kabu * A[i];
      }
    }
  }
  budget = budget + kabu * A[N - 1];
  cout << budget << endl;
}
