#include <bits/stdc++.h>
using namespace std;
int n, a[80], f = -1, kabu = 0, kane = 1000;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i < n; i++) {
    if ((f * (a[i] - a[i - 1])) < 0) {
      if (f < 0) {
        kabu += kane / a[i - 1];
        kane = kane - a[i - 1] * (kane / a[i - 1]);
        f = 1;
      } else if (f > 0) {
        kane += kabu * a[i - 1];
        kabu = 0;
        f = -1;
      }
    }
  }
  kane += kabu * a[n - 1];
  cout << kane << endl;
  return 0;
}
