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