#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a.at(i);
  }
  int t = 0;
  int m = 1000;
  int min;
  int max;
  bool flag = 1;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (flag) {
      if (a.at(i) > a.at(i + 1)) {
        continue;
      }
      if (a.at(i) < a.at(i + 1)) {
        min = a.at(i);
        t = m / min;
        m = m - t * min;
        flag = 0;
      }
    }
    if (!flag) {
      if (a.at(i) < a.at(i + 1)) {
        continue;
      }
      if (a.at(i) > a.at(i + 1)) {
        max = a.at(i);
        m = m + t * max;
        t = 0;
        flag = 1;
      }
    }
  }
  if (!flag) {
    m = m + t * a.at(n - 1);
    t = 0;
    flag = 0;
  }
  cout << m << endl;
}
