#include <bits/stdc++.h>
template <class T>
void rd(T &x) {
  x = 0;
  T f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - '0', ch = getchar();
  x *= f;
}
using namespace std;
const int N = 100;
int n, a[N];
long long now = 1000;
int main() {
  rd(n);
  for (int i = 1; i <= n; i++) rd(a[i]);
  int lst = 0x7fffffff;
  for (int i = 1; i <= n; i++) {
    if (a[i] > lst)
      now = now % lst + now / lst * a[i], lst = 0x7fffffff;
    else
      lst = a[i];
  }
  printf("%lld\n", now);
  return 0;
}
