#include <bits/stdc++.h>
using namespace std;
using ll = long long;
signed main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)n; i++) cin >> a[i];
  int kane = 1000;
  int kabu = 0;
  int ans = 1000;
  for (int i = 0; i < (int)n - 1; i++) {
    if (a[i] > a[i + 1]) {
      kane += a[i] * kabu;
      kabu = 0;
    } else if (a[i] < a[i + 1]) {
      kabu += kane / a[i];
      kane -= a[i] * kabu;
    }
  }
  kane += kabu * a[n - 1];
  cout << kane << endl;
}
