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