#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int cur = 1000;
  int pr;
  scanf("%d", &pr);
  for (int i = 1; i < n; ++i) {
    int v;
    scanf("%d", &v);
    if (v > pr) cur = cur % pr + cur / pr * v;
    pr = v;
  }
  printf("%d\n", cur);
  return 0;
}
