#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> av(n);
  for (auto& a : av) {
    cin >> a;
  }
  int c = 1000;
  for (int i = 1; i < n; ++i) {
    if (av[i - 1] < av[i]) {
      c = c / av[i - 1] * av[i] + c % av[i - 1];
    }
  }
  cout << c << endl;
  return 0;
}
