#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  long long m = 1000;
  int kab = 0;
  for (long long i = 0; i < (long long)(n); i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < (long long)(n); i++) {
    if (i == n - 1) {
      if (kab > 0) {
        m += kab * a[i];
        kab = 0;
      }
    } else {
      if (a[i] >= a[i + 1]) {
        if (kab > 0) {
          m += kab * a[i];
          kab = 0;
        }
        continue;
      } else {
        kab = m / a[i];
        m -= kab * a[i];
      }
    }
  }
  cout << m << endl;
}
