#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main(void) {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < (long long)(n); i++) {
    cin >> a[i];
  }
  int sum = 1000;
  int kabu = 0;
  bool rising = false;
  if (a[1] > a[0]) {
    kabu += sum / a[0];
    sum -= (sum / a[0]) * a[0];
    rising = true;
  }
  for (int i = 1; i < n - 1; i++) {
    if (!rising && a[i + 1] > a[i]) {
      kabu += sum / a[i];
      sum -= (sum / a[i]) * a[i];
      rising = true;
    } else if (rising && a[i + 1] < a[i]) {
      sum += kabu * a[i];
      kabu = 0;
      rising = false;
    }
  }
  sum += kabu * a[n - 1];
  kabu = 0;
  cout << sum << endl;
  return 0;
}
