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