#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  long long osaifu = 1000;
  long long kabu = 0;
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  int kau;
  for (int i = 0; i < N; i++) {
    if (i == N - 1 || A.at(i) > A.at(i + 1)) {
      osaifu += kabu * A.at(i);
      kabu = 0;
    } else {
      kau = osaifu / A.at(i);
      kabu += kau;
      osaifu -= A.at(i) * kau;
    }
  }
  cout << osaifu << endl;
}
