#include <bits/stdc++.h>
using namespace std;
long long n;
bool search(long long init, const vector<long long> &a) {
  for (int i = init + 1; i < n; ++i) {
    if (a[init] < a[i]) {
      return true;
    }
  }
  return false;
}
int main() {
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  long long res = 1000;
  long long stock = 0;
  long long today = a[0];
  for (long long i = 0; i < n; ++i) {
    if (i > 0) {
      if (a[i] > a[i - 1]) {
        res += (stock * a[i]);
        stock = 0;
      }
    }
    if (i == 0) {
      if (search(i, a)) {
        long long buy_stock = res / a[i];
        stock += buy_stock;
        res -= (buy_stock * a[i]);
      }
    }
    if (i > 0) {
      if ((a[i - 1] > a[i]) && search(i, a)) {
        long long buy_stock = res / a[i];
        stock += buy_stock;
        res -= (buy_stock * a[i]);
      }
    }
  }
  cout << res << endl;
  return 0;
}
