#include <bits/stdc++.h>
#pragma GCC optimize(2)
int read(void) {
  int res = 0, sign = 1;
  char ch = std::getchar();
  while (!std::isdigit(ch)) {
    if (ch == '-') sign = -1;
    ch = std::getchar();
  }
  while (std::isdigit(ch)) res = res * 10 + ch - 48, ch = std::getchar();
  return sign * res;
}
template <class Tp>
void write(const Tp &x) {
  if (x > 9) write(x / 10);
  std::putchar(x % 10 + 48);
}
const double PI = 3.1415926535898, E = 2.71828182845904;
const int MAXN = 89;
int n, a[MAXN];
int pos[MAXN], cnt;
int money = 1000;
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) a[i] = read();
  for (int i = 1, j = 1; i <= n; i = j + 1) {
    j = i;
    while (a[j + 1] >= a[j]) ++j;
    money = money % a[i] + money / a[i] * a[j];
  }
  write(money);
  return 0;
}
