#include <bits/stdc++.h>
const double PI = acos(-1);
using namespace std;
int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a.at(i);
  int sum, num;
  int anum;
  sum = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a.at(i) < a.at(i + 1)) {
      num += sum / a.at(i);
      sum %= a.at(i);
      anum = a.at(i);
    }
    if (a.at(i) > a.at(i + 1)) {
      if (num > 0) {
        sum += num * a.at(i);
        num = 0;
      }
    }
  }
  if (num > 0) sum += a.at(n - 1) * num;
  cout << sum << endl;
}
