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