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