#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 < n; i++) cin >> a[i];
  int m = 1000, s = 0;
  bool buy = true;
  for (int i = 0; i < n - 1; i++) {
    if (buy) {
      if (a[i] >= a[i + 1]) continue;
      int num = m / a[i];
      s += num;
      m -= num * a[i];
      buy = false;
    } else {
      if (a[i] <= a[i + 1]) continue;
      m += s * a[i];
      s = 0;
      buy = true;
    }
  }
  m += s * a[n - 1];
  cout << m << endl;
  return 0;
}
