#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 < (int)(n); i++) cin >> a[i];
  int asset = 1000;
  int stock = 0;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (a[i] < a[i + 1]) {
      int add = asset / a[i];
      stock += add;
      asset -= a[i] * add;
    }
    if (a[i] > a[i + 1]) {
      if (a[i - 1] < a[i]) {
        asset += a[i] * stock;
        stock = 0;
      }
      int t = i;
      while (a[t - 1] == a[t]) {
        t--;
        if (a[i - 1] < a[i]) {
          asset += a[i] * stock;
          stock = 0;
        }
      }
    }
  }
  asset += a[n - 1] * stock;
  cout << asset << endl;
  return 0;
}
