#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int LARGE_INT = 1e9 + 100;
const int INF = 2e9 + 100;
const long long INF_LL = (long long)INF * (long long)INF;
const int MOD = 1e9 + 7;
long long modpow(long long a, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % MOD;
    a = a * a % MOD;
    n >>= 1;
  }
  return res;
}
void Main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = (0); i < (n); ++i) {
    cin >> a[i];
  }
  vector<long long> x(n);
  for (int i = (0); i < (n - 1); ++i) {
    if (a[i] == a[i + 1]) {
      x[i] = 0;
    }
    if (a[i] < a[i + 1]) {
      x[i] = 1;
    }
    if (a[i] > a[i + 1]) {
      x[i] = 2;
    }
  }
  long long m = 1000;
  long long s = 0;
  for (int i = (0); i < (n - 1); ++i) {
    if (x[i] == 1) {
      int kai = m / a[i];
      s += kai;
      m -= kai * a[i];
    }
    if (x[i] == 2) {
      m += s * a[i];
      s = 0;
    }
  }
  if (s > 0) {
    m += s * a[n - 1];
  }
  cout << m << endl;
  return;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Main();
  return 0;
}
