#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> vec.at(i);
  }
  int cmax, cmin;
  cmin = vec.at(0);
  int money = 1000;
  int k = 0;
  for (int i = 1; i < n; i++) {
    if (vec.at(i) >= vec.at(i - 1)) {
      cmax = vec.at(i);
      k = 1;
    } else {
      if (k == 1) {
        money = (money / cmin) * cmax + money % cmin;
        cmin = vec.at(i);
        k = 0;
      } else {
        cmin = vec.at(i);
        k = 0;
      }
    }
  }
  if (k == 1) {
    money = (money / cmin) * cmax + money % cmin;
  }
  cout << money << endl;
  return 0;
}
