#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O0")
const long long int mod = 1e9 + 7;
const long long int INF = 1e18;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << setprecision(15) << fixed;
  chrono::system_clock::time_point start, end;
  start = chrono::system_clock::now();
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  vector<long long int> b;
  vector<long long int> c;
  b.push_back(a[0]);
  for (long long int i = 0; i < (n - 1); ++i) {
    if (a[i] < a[i + 1]) {
      b.push_back(a[i + 1]);
      c.push_back(1);
    }
    if (a[i] > a[i + 1]) {
      b.push_back(a[i + 1]);
      c.push_back(-1);
    }
  }
  long long int money = 1000;
  long long int kabu = 0;
  for (long long int i = 0; i < (c.size()); ++i) {
    if (c[i] == 1) {
      kabu += money / b[i];
      money -= kabu * b[i];
    } else {
      money += kabu * b[i];
      kabu = 0;
    }
  }
  money += b[c.size()] * kabu;
  cout << money << '\n';
  end = chrono::system_clock::now();
  auto elapsed =
      chrono::duration_cast<chrono::milliseconds>(end - start).count();
  cerr << elapsed << "ms" << '\n';
}
