#include <bits/stdc++.h>
using namespace std;
const float pi = 3.1415926535;
unsigned GetDigit(unsigned num) { return to_string(num).length(); }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  vector<int> check(n + 1);
  check.at(0) = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a.at(i) < a.at(i + 1))
      check.at(i + 1) = 1;
    else
      check.at(i + 1) = 0;
  }
  if (a.at(n - 1) > a.at(n - 2)) check.at(n) = 0;
  int ans = 1000;
  int kabu = 0;
  for (int i = 1; i <= n; i++) {
    if (check.at(i - 1) == 0 && check.at(i) == 1) {
      kabu = ans / a.at(i - 1);
      ans -= a.at(i - 1) * kabu;
    }
    if (check.at(i - 1) == 1 && check.at(i) == 0) {
      ans += a.at(i - 1) * kabu;
      kabu = 0;
    }
  }
  cout << ans << endl;
}
