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