#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  ll s = 0;
  ll m = 1000;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      m += s * a[i];
      s = 0;
    } else if (a[i] < a[i + 1]) {
      s = m / a[i];
      m %= a[i];
    }
  }
  m += a[n - 1] * s;
  cout << m << endl;
  return 0;
}
