#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long yen = 1000;
  long long s = 0;
  long long nw = 0;
  for (long long i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      nw = yen / a[i];
      yen -= nw * a[i];
      s += nw;
    }
    if (a[i] > a[i + 1]) {
      yen += s * a[i];
      s = 0;
    }
  }
  if (a[n - 1] > a[n - 2]) {
    yen += s * a[n - 1];
    s = 0;
  }
  cout << yen << endl;
}
