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