#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  cin >> N;
  vector<long long> v(N);
  vector<string> Q(N);
  for (int X = 0; X < N; X++) {
    cin >> v[X];
  }
  if (v[0] < v[1]) {
    Q[0] = "kai";
  }
  for (long long X = 0; X < N; X++) {
    if (X < N - 1) {
      if (v[X] > v[X + 1]) {
        Q[X] = "uri";
      } else if (v[X] < v[X + 1]) {
        Q[X] = "kai";
      }
    } else if (X == N - 1) {
      Q[X] = "uri";
    }
  }
  long long kabu = 0;
  long long kane = 1000;
  for (long long X = 0; X < N; X++) {
    if (Q[X] == "kai") {
      kabu += kane / v[X];
      kane -= kabu * v[X];
    } else if (Q[X] == "uri") {
      kane += kabu * v[X];
      kabu = 0;
    }
  }
  cout << kane << endl;
}
