#include <bits/stdc++.h>
using namespace std;
long long T, n, i, j, k, x, y, z;
long long a[510], f[510];
char c[510];
struct Data {
  int x, y;
} d[510];
inline int Abs(int x) { return (x < 0) ? -x : x; }
inline void Swap(int &a, int &b) { a ^= b ^= a ^= b; }
inline int Min(int a, int b) { return (a < b) ? a : b; }
inline int Max(int a, int b) { return (a > b) ? a : b; }
inline bool cmp(const Data a, const Data b) { return a.x < b.x; }
inline long long Mi(long long x, long long y) {
  long long p = x, t = 1, Res = 1;
  for (; t <= y; (t & y) ? Res = (Res * p) % 998244353 : 0,
                           p = (p * p) % 998244353, t <<= 1)
    ;
  return Res;
}
inline long long read() {
  long long p = 0, f = 1;
  char c = getchar();
  while (c < 48 || c > 57) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= 48 && c <= 57) p = (p << 1) + (p << 3) + c - 48, c = getchar();
  return p * f;
}
int main() {
  n = read();
  for (i = 1; i <= n; i++) a[i] = read();
  f[1] = 1000;
  for (i = 2; i <= n; i++) {
    f[i] = f[i - 1];
    for (j = 1; j < i; j++) {
      f[i] = Max(f[i], f[j] / a[j] * a[i] + f[j] % a[j]);
    }
  }
  cout << f[n] << endl;
  return 0;
}
