#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);
  int k, m = 1000;
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  for (int i = 0; i < (int)(n - 1); i++) {
    if (a[i] < a[i + 1]) {
      if (m > a[i]) {
        k += m / a[i];
        m -= k * a[i];
      }
    } else if (a[i] >= a[i + 1]) {
      m += k * a[i];
      k = 0;
    }
  }
  cout << m + k * a[n - 1] << endl;
  return 0;
}
