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