#include <bits/stdc++.h>
using namespace std;
long long top(long long r, long long g) {
  long long cnt = 0;
  while (g <= r) {
    g = g << 1;
    cnt++;
  }
  return cnt;
}
int main() {
  long long n, k;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  vector<long long> mina, maxa;
  bool f = false;
  long long tot = 1000;
  long long ans = tot;
  for (long long i = 1; i < n; i++) {
    if (a[i] > a[i - 1]) {
      long long nn = tot / a[i - 1];
      tot -= nn * a[i - 1];
      tot += nn * a[i];
      i++;
      if (ans < tot) ans = tot;
    } else if (a[i] < a[i - 1]) {
    }
  }
  cout << ans << endl;
  return 0;
}
