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