#include <bits/stdc++.h>
using namespace std;
long long i, j;
long long mod = 1000000007;
double pi = acos(-1);
long long cei(long long x, long long y) {
  long long ans = x / y;
  if (x % y != 0) ans++;
  return ans;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
long long llpow(long long x, long long n) {
  long long ans = 1;
  for ((i) = (0); (i) < (n); (i)++) {
    ans *= x;
    ans %= mod;
  }
  return ans;
}
long long fact(long long x) {
  long long ans = 1;
  for ((i) = (0); (i) < (x); (i)++) ans *= (x - i);
  return ans;
}
long long ncr(long long n, long long r) {
  return fact(n) * fact(n - r) / fact(r);
}
long long npr(long long n, long long r) { return fact(n) / fact(n - r); }
bool prime(long long a) {
  if (a <= 1) return false;
  for (i = 2; i * i <= a; i++) {
    if (a % i == 0) return false;
  }
  return true;
}
long long fib(long long x) {
  long long fibo[x + 10];
  fibo[0] = 1;
  fibo[1] = 1;
  fibo[2] = 1;
  for ((i) = (3); (i) < (x + 1); (i)++) fibo[i] = fibo[i - 1] + fibo[i - 2];
  return fibo[x];
}
long long dig(long long n) {
  long long d = 1, tmp = n;
  while (tmp / 10 > 0) {
    tmp /= 10;
    d++;
  }
  return d;
}
int main() {
  long long n, k;
  cin >> n;
  vector<long long> a;
  long long b;
  long long m = 1000, st = 0;
  for ((i) = (0); (i) < (n); (i)++) {
    cin >> b;
    (a).push_back(b);
  }
  st += m / a[0];
  m %= a[0];
  long long ans;
  for ((i) = (1); (i) < (n); (i)++) {
    if (a[i - 1] > a[i]) {
      st += m / a[i];
      m %= a[i];
    } else if (a[i - 1] < a[i]) {
      m += a[i] * st;
      st = 0;
    }
  }
  m = max((long long)1000, m);
  cout << m << endl;
  return 0;
}
