#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long double EPS = 1e-6;
long long qread() {
  char c = getchar();
  int neg = 1;
  long long val = 0;
  while (c != '-' && !isdigit(c)) c = getchar();
  if (c == '-') c = getchar(), neg = -1;
  while (isdigit(c)) val = (val << 3) + (val << 1) + c - '0', c = getchar();
  return neg * val;
}
const int N = 100;
int a[N], n;
void solve() {
  n = qread();
  for (int i = 1; i <= (int)n; i++) a[i] = qread();
  int t = 1000, st = 0;
  for (int i = 1; i <= (int)n - 1; i++) {
    if (a[i + 1] >= a[i]) {
      int d = t / a[i];
      t -= d * a[i];
      st += d;
    } else {
      int d = st * a[i];
      t += d;
      st = 0;
    }
  }
  printf("%d\n", st * a[n] + t);
}
int main() {
  int T = 1;
  while (T--) solve();
  return 0;
}
