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