#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long n, k, t, m, q, flag = 0;
long long power(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long min(long long a, long long b) {
  if (a > b)
    return b;
  else
    return a;
}
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long gcd(long long a, long long b) {
  if (b > a) return gcd(b, a);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  t = 1;
  while (t--) {
    cin >> n;
    long long a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    long long money = 1000, stock = 0;
    for (int i = 0; i < n; i++) {
      if (i == 0) {
        if (a[i] >= a[i + 1])
          ;
        else {
          stock = 1000 / a[i];
          money -= stock * a[i];
        }
      } else if (i == n - 1) {
        money += stock * a[i];
      } else {
        if (a[i] >= a[i - 1] && a[i] > a[i + 1]) {
          money += stock * a[i];
          stock = 0;
        } else if (a[i] < a[i - 1] && a[i] <= a[i + 1]) {
          stock = money / a[i];
          money -= stock * a[i];
        }
      }
    }
    cout << money << "\n";
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
