#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int m = 1000;
  int pre = a[0];
  int maxi = 1000;
  bool f = true;
  int k;
  for (int i = 1; i < n; ++i) {
    if (f) {
      if (a[i] < pre)
        pre = a[i];
      else {
        k = m / pre;
        m -= pre * k;
        f = false;
        pre = a[i];
      }
    } else {
      if (a[i] > pre)
        pre = a[i];
      else {
        m += k * pre;
        f = true;
        pre = a[i];
      }
    }
  }
  if (!f) {
    m += k * pre;
  }
  cout << m << endl;
}
int main() {
  long long int t = 1;
  while (t--) {
    solve();
  }
}
