#include <bits/stdc++.h>
int upi(const void* a, const void* b) {
  return *(int*)a < *(int*)b ? -1 : *(int*)a > *(int*)b ? 1 : 0;
}
int downi(const void* a, const void* b) {
  return *(int*)a < *(int*)b ? 1 : *(int*)a > *(int*)b ? -1 : 0;
}
void sortupi(int* a, int n) { qsort(a, n, sizeof(int), upi); }
void sortdowni(int* a, int n) { qsort(a, n, sizeof(int), downi); }
int upLL(const void* a, const void* b) {
  return *(long long*)a < *(long long*)b   ? -1
         : *(long long*)a > *(long long*)b ? 1
                                           : 0;
}
int downLL(const void* a, const void* b) {
  return *(long long*)a < *(long long*)b   ? 1
         : *(long long*)a > *(long long*)b ? -1
                                           : 0;
}
void sortupLL(long long* a, int n) { qsort(a, n, sizeof(long long), upLL); }
void sortdownLL(long long* a, int n) { qsort(a, n, sizeof(long long), downLL); }
int cmp_char(const void* a, const void* b) { return *(char*)a - *(char*)b; }
int cmp_str(const void* a, const void* b) {
  return strcmp(*(const char**)a, *(const char**)b);
}
long long gcd(long long p, long long q) {
  while (q) {
    long long t = p % q;
    p = q;
    q = t;
  }
  return p;
}
long long modpow(long long a, long long n, int m) {
  long long x = 1;
  for (a %= m; n; n /= 2) n& 1 ? x = x * a % m : 0, a = a * a % m;
  return x;
}
typedef struct fac {
  long long n, exp;
} F;
long long fact(long long n, F* a) {
  long long x, i, j, c = 0;
  x = n;
  for (i = 2; i * i <= x; i++) {
    for (j = 1; x % i == 0; j++) x /= i;
    if (j > 1) {
      a[c].n = i;
      a[c++].exp = j - 1;
    }
  }
  if (x - 1) {
    a[c].n = x;
    a[c++].exp = 1;
  }
  return c;
}
int main() {
  int n, a[109];
  scanf("%d", &n);
  for (int i = (int)(0); i < (int)(n); i++) scanf("%d", &a[i]);
  a[n] = 0;
  int b[109] = {0}, c = 0, m = 100;
  for (int i = (int)(0); i < (int)(n + 1); i++) {
    if (!i) continue;
    if (a[i] < m) {
      b[c]++;
      b[i - 1]--;
      c = i;
    }
    m = a[i];
  }
  long long ans = 1000, kb = 0;
  for (int i = (int)(0); i < (int)(n); i++) {
    if (b[i] == 1) {
      kb = ans / a[i];
      ans -= a[i] * kb;
    }
    if (b[i] == -1) {
      ans += a[i] * kb;
      kb = 0;
    }
  }
  printf("%lld", ((ans) > (1000) ? (ans) : (1000)));
  return 0;
}
