#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using vec = vector<int>;
using P = pair<int, int>;
const int INF = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vec a(n);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  int k = 0, m = 1000;
  int d = 0;
  for (int i = 0; i < (n - 1); ++i) {
    if (i == 0) {
    } else if (a[i - 1] < a[i]) {
      d = 1;
    } else if (a[i - 1] > a[i]) {
      d = -1;
    }
    if (d <= 0 && a[i] < a[i + 1]) {
      k += m / a[i];
      m %= a[i];
    } else if (d >= 0 && a[i] > a[i + 1]) {
      m += k * a[i];
      k = 0;
    }
  }
  m += k * a[n - 1];
  cout << m << endl;
}
