#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    vec.at(i) = a;
  }
  int k, m;
  m = 1000;
  k = 0;
  for (int i = 0; i < N - 1; i++) {
    if (vec.at(i) < vec.at(i + 1)) {
      k = m / vec.at(i);
      m -= vec.at(i) * k;
    } else {
      m += k * vec.at(i);
      k = 0;
    }
  }
  m += vec.at(N - 1) * k;
  cout << m << endl;
}
