#include <bits/stdc++.h>
#pragma target("avx")
#pragma optimize("O3")
#pragma optimize("unroll-loops");
constexpr double eps = 1e-9;
constexpr double pi = 3.141592653589793238462643383279;
using namespace std;
using ll = long long;
using ld = long double;
using Pa = pair<int, int>;
ll mod = 1000000007;
ll MOD = 998244353;
ll gcd(ll a, ll b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
ll pow(ll x, ll n) {
  x %= mod;
  if (n == 0) return 1;
  if (n % 2 == 0)
    return (pow((x * x) % mod, n / 2) % mod);
  else
    return (x * pow(x, n - 1)) % mod;
}
signed main() {
  ll money = 1000;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int kabu = 0;
  int maxday = 0;
  int maxmoney = 0;
  vector<int> b;
  b.push_back(a[0]);
  for (int i = 1; i <= n - 1; i++) {
    if (a[i - 1] != a[i]) b.push_back(a[i]);
  }
  int k = sizeof(b);
  vector<string> s(k);
  s[0] = "usual";
  for (int i = 1; i <= k - 1; i++) {
    if (b[i - 1] < b[i])
      s[i] = "up";
    else
      s[i] = "down";
  }
  int p = k - 1;
  while (s[p] == "down") {
    b.pop_back(), p--;
    if (p < 0) break;
  }
  k = sizeof(b);
  if (s[1] == "up") kabu += money / b[0], money -= b[0] * kabu;
  for (int i = 1; i <= k - 1; i++) {
    if (i == k - 1) {
      money += kabu * b[i];
    } else if (s[i] == "down" && s[i + 1] == "up") {
      kabu = money / b[i];
      money -= (kabu * b[i]);
    } else if (s[i] == "up" && s[i + 1] == "down") {
      money += kabu * b[i];
      kabu = 0;
    }
  }
  ll mo = 1000;
  cout << max(money, mo) << endl;
}
