#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  vector<int> A(N);
  for (long long i = 0; i < long long(N); i++) cin >> A.at(i);
  long long shozikin = 1000;
  long long kabu = 0;
  if (A.at(0) < A.at(1)) {
    int n_buy = shozikin / A.at(0);
    shozikin -= n_buy * A.at(0);
    kabu += n_buy;
  }
  for (long long i = 1; i < long long(N - 1); i++) {
    if (A.at(i) <= A.at(i - 1) && A.at(i) < A.at(i + 1)) {
      int n_buy = shozikin / A.at(i);
      shozikin -= n_buy * A.at(i);
      kabu += n_buy;
    } else if (A.at(i) > A.at(i - 1) && A.at(i) >= A.at(i + 1)) {
      shozikin += kabu * A.at(i);
      kabu = 0;
    }
  }
  shozikin += kabu * A.at(N - 1);
  cout << shozikin << endl;
  return 0;
}
