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