#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k;
  cin >> n;
  vector<int> a(n, 0);
  j = 0;
  for (i = 0; i < n; i++) {
    cin >> a.at(j);
    if (j == 0 || a.at(j) != a.at(j - 1)) {
      j++;
    }
  }
  n = j;
  vector<int> vl(n), mt(n);
  j = 0;
  k = 0;
  if (a.at(0) < a.at(1)) {
    vl.at(0) = a.at(0);
    j = 1;
  }
  for (i = 1; i < n - 1; i++) {
    if (a.at(i) > a.at(i - 1) && a.at(i) > a.at(i + 1)) {
      mt.at(k) = a.at(i);
      k++;
    } else if (a.at(i) < a.at(i - 1) && a.at(i) < a.at(i + 1)) {
      vl.at(j) = a.at(i);
      j++;
    }
  }
  if (a.at(n - 1) > a.at(n - 2)) {
    mt.at(k) = a.at(n - 1);
    k++;
  }
  long long money = 1000;
  for (i = 0; i < k; i++) {
    money += (money / vl.at(i)) * (mt.at(i) - vl.at(i));
  }
  cout << money << endl;
}
