#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  ll m = 1000, n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  int k = 0, p = 0;
  for (int i = 0; i < (int)(n); i++) {
    if (i == 0) {
      if (a[i] <= a[i + 1]) {
        k = m / a[i];
        p = a[i];
        m -= k * p;
      }
    } else if (i == n - 1) {
      if (a[i] > a[i - 1]) m += k * a[i];
    } else {
      if (a[i] < a[i - 1] && a[i] <= a[i + 1]) {
        k = m / a[i];
        p = a[i];
        m -= k * p;
      }
      if (a[i] > a[i - 1] & a[i] >= a[i + 1]) {
        m += k * a[i];
        k = 0;
        p = 0;
      }
    }
  }
  cout << m << endl;
}
