#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int st = 0;
  int m = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      int x = m / a[i];
      st += x;
      m = m - (x * a[i]);
    } else if (a[i] > a[i + 1]) {
      m = m + (st * a[i]);
      st = 0;
    }
  }
  m += (st * a[n - 1]);
  cout << m << endl;
}
int main() {
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
