#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];
  long long mxkabu = 0, mxkabu_kane = 0, mxkane = 1000;
  for (int i = 0; i < n; i++) {
    long long tmp = max(mxkane, mxkabu * a[i] + mxkabu_kane);
    if (mxkabu > mxkane / a[i])
      mxkabu = mxkabu;
    else {
      mxkabu = mxkane / a[i];
      mxkabu_kane = max(mxkabu_kane, mxkane % a[i]);
    }
    mxkane = tmp;
  }
  cout << mxkane << endl;
}
