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