#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int s = 0;
  int b = 0;
  int al = 1;
  int pr = 1000;
  int q = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i + 1] > a[i] && al == 1) {
      if (al) {
        q = pr / a[i];
        pr = pr - q * a[i];
        al = 0;
      }
    } else {
      if (q != 0) {
        pr += q * a[i];
        q = 0;
      }
      al = 1;
    }
  }
  if (q != 0) {
    pr += q * a[n - 1];
  }
  cout << pr << endl;
}
