#include <bits/stdc++.h>
const int bufSize = 1e6;
inline char nc() {
  static char buf[bufSize], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, bufSize, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline void read(char *s) {
  static char c;
  for (; !isalpha(c); c = nc())
    ;
  for (; isalpha(c); c = nc()) *s++ = c;
  *s = '\0';
}
template <typename T>
inline T read(T &r) {
  static char c;
  static int flag;
  flag = 1, r = 0;
  for (c = nc(); !isdigit(c); c = nc())
    if (c == '-') flag = -1;
  for (; isdigit(c); c = nc()) r = r * 10 + c - 48;
  return r *= flag;
}
const int maxn = 100;
int n;
int a[maxn], f[maxn];
int main() {
  read(n);
  for (int i = 1; i <= n; ++i) read(a[i]);
  f[1] = 1000;
  for (int i = 2; i <= n; ++i) {
    f[i] = f[i - 1];
    for (int j = 1; j < i; ++j) {
      if (a[i] <= a[j]) continue;
      int num = f[j] / a[j];
      f[i] = std::max(f[i], f[j] - num * a[j] + num * a[i]);
    }
  }
  printf("%d\n", f[n]);
  return 0;
}
