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