#include <bits/stdc++.h>
inline int read() {
  register int t = 0;
  register char v = getchar();
  while (v < '0') v = getchar();
  while (v >= '0') t = (t << 3) + (t << 1) + v - 48, v = getchar();
  return t;
}
int a[200002], b, c, n, ans = 1000;
int main() {
  n = read();
  for (register int i = 1; i <= n; ++i) a[i] = read();
  for (register int i = 2; i <= n; ++i)
    if (a[i] > a[i - 1]) ans = ans % a[i - 1] + ans / a[i - 1] * a[i];
  printf("%d", ans);
}
