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