#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 + 1) - a.at(i)) * num;
    }
  }
  cout << sum << endl;
}
