#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<int> a(n + 1);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  int m = 1000, b = 0;
  for (int i = 0; i < n; i++) {
    if (i == n && b < 0) {
      m += a.at(i) * b;
    }
    if (a[i] > a.at(i + 1) && i != n) {
      m += a.at(i) * b;
    }
    if (a[i] < a.at(i + 1) && i != n) {
      b = m / a.at(i);
      m %= a[i];
    }
  }
  cout << m << endl;
}
